Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Danny Smith <dannysmith-oKK1aGe2n869koe0gwxAeg <at> public.gmane.org>
Subject: Re: Patch: Eliminate warnings in wchar.h
Newsgroups: gmane.comp.gnu.mingw.devel
Date: Tuesday 10th February 2004 09:25:39 UTC (over 13 years ago)
From: "Wu Yongwei"

> --- Patch ---
> Index: winsup/mingw/include/wchar.h
> ===================================================================
> RCS file: /cvs/src/src/winsup/mingw/include/wchar.h,v
> retrieving revision 1.14
> diff -u -p -r1.14 wchar.h
> --- winsup/mingw/include/wchar.h        24 Sep 2003 00:41:01 -0000
1.14
> +++ winsup/mingw/include/wchar.h        10 Feb 2004 06:49:45 -0000
> @@ -298,8 +298,8 @@ size_t __cdecl wcsrtombs(char *, const w
>   int __cdecl wctob(wint_t);
>
>   #ifndef __NO_ISOCEXT /* these need static lib libmingwex.a */
> -__CRT_INLINE int __cdecl fwide(FILE* stream, int mode) {return -1;}
/* limited to byte orientation */
> -__CRT_INLINE int __cdecl mbsinit(const mbstate_t* ps) {return 1;}
> +__CRT_INLINE int __cdecl fwide(FILE*, int) {return -1;} /* limited to
byte orientation */
> +__CRT_INLINE int __cdecl mbsinit(const mbstate_t*) {return 1;}
>   wchar_t* __cdecl wmemset(wchar_t* s, wchar_t c, size_t n);
>   wchar_t* __cdecl wmemchr(const wchar_t* s, wchar_t c, size_t n);
>   int wmemcmp(const wchar_t* s1, const wchar_t * s2, size_t n);
> --- Patch ---
>
> Danny, is it OK?


No. Omitting the parameter name is not allowed in C.(yet)

Like this might work

/* in _mingw.h */
#ifdef __cplusplus
# define __UNUSED_PARAM(x)
#else
# ifdef __GNUC__
#  define __UNUSED_PARAM (x) x __attribute__((unused))
# else
#  define __UNUSED_PARAM(x) x
# endif
#endif


/* in wchar.h */

__CRT_INLINE int __cdecl fwide(FILE* __UNUSED_PARAM(stream),
                                                          int
__UNUSED_PARAM(mode) )
   {return -1;}


> Best regards,
>
> Wu Yongwei
>
>
>
>
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> MinGW-dvlpr mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mingw-dvlpr




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
 
CD: 4ms