#183 Removing null args so as to remove warnings

closed-rejected
nobody
2004-02-16
2004-02-16
Wu Yongwei
No

Purpose: to eliminate some warnings in wchar.h under
GCC 2.95.x, like

c:/mingw/bin/../lib/gcc-lib/mingw32/2.95.3-
8/../../../../include/wchar.h:
In function `int fwide(FILE *, int)':
c:/mingw/bin/../lib/gcc-lib/mingw32/2.95.3-
8/../../../../include/wchar.h:301:
warning: unused parameter `struct FILE * stream'
c:/mingw/bin/../lib/gcc-lib/mingw32/2.95.3-
8/../../../../include/wchar.h:301:
warning: unused parameter `int mode'
c:/mingw/bin/../lib/gcc-lib/mingw32/2.95.3-
8/../../../../include/wchar.h:
In function `int mbsinit(const mbstate_t *)':
c:/mingw/bin/../lib/gcc-lib/mingw32/2.95.3-
8/../../../../include/wchar.h:302:
warning: unused parameter `const mbstate_t * ps'

It should also be OK to comment out the unused
arguments.

Discussion

  • Wu Yongwei

    Wu Yongwei - 2004-02-16

    Patch to wchar.h

     
  • Danny Smith

    Danny Smith - 2004-02-16
    • status: open --> closed-rejected
     
  • Danny Smith

    Danny Smith - 2004-02-16

    Logged In: YES
    user_id=11494

    With your patch:

    D:\develop\cygwin-cvs-head\src\winsup\mingw\include>gcc -
    c -x c wchar.h
    wchar.h: In function `fwide':
    wchar.h:301: error: parameter name omitted
    wchar.h:301: error: parameter name omitted
    wchar.h: In function `mbsinit':
    wchar.h:302: error: parameter name omitted

     
  • Wu Yongwei

    Wu Yongwei - 2004-02-17

    Logged In: YES
    user_id=399758

    OK. C and C++ have different rules for arguments, which I did
    not see. Changing the Makefile or tolerating the warning is
    easier than trying to maintain different code for C and C++.

     
  • Luke Dunstan

    Luke Dunstan - 2004-02-17

    Logged In: YES
    user_id=30442

    Wu,

    You already posted this patch to mingw-dvlpr and Danny
    replied on 10 Feb describing the problem and a simple solution:

    http://article.gmane.org/gmane.comp.gnu.mingw.devel/859

    I'm just pointing it out because your submitting this patch
    suggests that you probably missed his reply.

    Luke

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks