a few warning fixes

2009-01-30
2013-06-06
  • Ozkan Sezer
    Ozkan Sezer
    2009-01-30

    Here are fixes for a few warnings I caught in the gcc build:
    http://uhexen2.sourceforge.net/tmp/w64diffs/

    I build the toolchain as a cross compiler (i686-linux to x86_64-win)
    and the warnings appear in the second stage of gcc buid (after
    creating the "winsup" symlink).  They are mostly due to the long
    type being assumed as 64 bit on all 64 bit platforms, or sometimes
    due to a missing header.  I specifically don't like what I did to md5.h,
    there may be a more general solution to that (why does it not
    include stdint.h and use it??)  They warnings may be more of a
    problem if the toolchain is built as a native win64 application.
    I caught these warnings only for the c language configured. No
    other configurations are tested.  Tell me if they are acceptable,
    and if they are, feel free to use/commit them.

    There still are some other warnings, though, such as:

    ../../../gcc-svn/libssp/ssp.c: In function '__stack_chk_fail_local':
    ../../../gcc-svn/libssp/ssp.c:179: warning: visibility attribute not supported in this configuration; ignored

    ../../../gcc-svn/libssp/ssp-local.c: In function '__stack_chk_fail_local':
    ../../../gcc-svn/libssp/ssp-local.c:50: warning: visibility attribute not supported in this configuration; ignored

    /bin/sh ./libtool --tag=CC --mode=link [....] -static libssp_nonshared_la-ssp-local.lo
    libtool: link: warning: undefined symbols not allowed in x86_64-pc-mingw32 shared libraries

    ../../../gcc-svn/libiberty/fdmatch.c: In function 'fdmatch':
    ../../../gcc-svn/libiberty/fdmatch.c:57: warning: 'sbuf1' may be used uninitialized in this function
    ../../../gcc-svn/libiberty/fdmatch.c:57: warning: 'sbuf2' may be used uninitialized in this function

    ../../../gcc-svn/libiberty/strerror.c:472: warning: '_sys_nerr' redeclared without dllimport attribute: previous dllimport ign
    ored
    ../../../gcc-svn/libiberty/strerror.c:473: warning: '_sys_errlist' redeclared without dllimport attribute: previous dllimport
    ignored

    I don't know how serious they are.

    Regards,
    Ozkan

     
    • Ozkan Sezer
      Ozkan Sezer
      2009-02-21

      OK, I created gcc bugzilla entries for my patches: 39062, 39063, 39064, 39065, 39066.  If any of you guys with write access can review/apply (or reject) them, it would be nice.

      Regards.