This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

warning in fcloseall.c fix patch


Hello.
I have the following warning when compiling Newlib:

/home/dedekind/work/newlib_proj/contribution/src/newlib-snapshot/newlib/libc/stdio/fcloseall.c:

In function `_fcloseall_r':
/home/dedekind/work/newlib_proj/contribution/src/newlib-snapshot/newlib/libc/stdio/fcloseall.c:70:


warning: passing arg 2 of `_fwalk_reent' from incompatible pointer type

Here is the patch to correct this. Is it OK?

--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
cvs server: Diffing .
Index: fwalk.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/fwalk.c,v
retrieving revision 1.6
diff -c -r1.6 fwalk.c
*** fwalk.c	23 Apr 2004 20:01:55 -0000	1.6
--- fwalk.c	28 Apr 2004 13:28:25 -0000
***************
*** 30,36 ****
  static int
  _DEFUN(__fwalk, (ptr, function),
         struct _reent *ptr _AND
!        register int (*function) ())
  {
    register FILE *fp;
    register int n, ret = 0;
--- 30,36 ----
  static int
  _DEFUN(__fwalk, (ptr, function),
         struct _reent *ptr _AND
!        register int (*function) (FILE *))
  {
    register FILE *fp;
    register int n, ret = 0;
***************
*** 54,60 ****
  static int
  _DEFUN(__fwalk_reent, (ptr, reent_function),
         struct _reent *ptr _AND
!        register int (*reent_function) ())
  {
    register FILE *fp;
    register int n, ret = 0;
--- 54,60 ----
  static int
  _DEFUN(__fwalk_reent, (ptr, reent_function),
         struct _reent *ptr _AND
!        register int (*reent_function) (struct _reent *, FILE *))
  {
    register FILE *fp;
    register int n, ret = 0;
***************
*** 76,82 ****
  int
  _DEFUN(_fwalk, (ptr, function),
         struct _reent *ptr _AND
!        register int (*function)())
  {
    register int ret = 0;
  
--- 76,82 ----
  int
  _DEFUN(_fwalk, (ptr, function),
         struct _reent *ptr _AND
!        register int (*function)(FILE *))
  {
    register int ret = 0;
  
***************
*** 99,105 ****
  int
  _DEFUN(_fwalk_reent, (ptr, reent_function),
         struct _reent *ptr _AND
!        register int (*reent_function) ())
  {
    register int ret = 0;
  
--- 99,105 ----
  int
  _DEFUN(_fwalk_reent, (ptr, reent_function),
         struct _reent *ptr _AND
!        register int (*reent_function) (struct _reent *, FILE *))
  {
    register int ret = 0;
  
Index: local.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/local.h,v
retrieving revision 1.10
diff -c -r1.10 local.h
*** local.h	23 Apr 2004 20:01:55 -0000	1.10
--- local.h	28 Apr 2004 13:28:26 -0000
***************
*** 41,47 ****
  extern _VOID   _EXFUN(_cleanup_r,(struct _reent *));
  extern _VOID   _EXFUN(__smakebuf,(FILE *));
  extern int    _EXFUN(_fwalk,(struct _reent *, int (*)(FILE *)));
! extern int    _EXFUN(_fwalk_reent,(struct _reent *, int (*)(FILE *)));
  struct _glue * _EXFUN(__sfmoreglue,(struct _reent *,int n));
  extern int   _EXFUN(__srefill,(FILE *fp));
  
--- 41,47 ----
  extern _VOID   _EXFUN(_cleanup_r,(struct _reent *));
  extern _VOID   _EXFUN(__smakebuf,(FILE *));
  extern int    _EXFUN(_fwalk,(struct _reent *, int (*)(FILE *)));
! extern int    _EXFUN(_fwalk_reent,(struct _reent *, int (*)(struct _reent *, FILE *)));
  struct _glue * _EXFUN(__sfmoreglue,(struct _reent *,int n));
  extern int   _EXFUN(__srefill,(FILE *fp));
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]