• cygwin -96

    From Tommi Koivula@2:221/1 to All on Mon Dec 11 08:30:10 2017
    Hi All.

    I'm getting some warnings when compiling under the newest cygwin:

    Compiling unix/setpttl.c...
    Compiling unix/daemonize.c...
    Compiling unix/ns_parse.c...
    unix/ns_parse.c:19:19: warning: 'rcsid' defined but not used [-Wunused -const-variable=]
    static const char rcsid[] = "Id: ns_parse.c,v 8.13 1999/10/13 16:39:3
    5 vixie Exp";
    ^~~~~
    Compiling https.c...
    https.c: In function 'h_connect':
    https.c:372:6: warning: this 'if' clause does not guard... [-Wmisleadi ng-indentation]
    if (n<0)
    ^~
    https.c:374:7: note: ...this statement, but the latter is misleadingly
    indented as if it is guarded by the 'if'
    Log(2, "connection closed by socks server...");
    ^~~
    Compiling compress.c...
    Compiling srv_gai.c...
    Linking binkd...


    C:\bbs\BinkD\cvs\binkd>gcc -v
    Using built-in specs.
    COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/lto-wrapper.exe
    Target: x86_64-pc-cygwin
    Configured with: /cygdrive/i/szsz/tmpp/gcc/gcc-6.4.0-4.x86_64/src/gcc-6. 4.0/configure --srcdir=/cygdrive/i/szsz/tmpp/gcc/gcc-6.4.0-4.x86_64/src/ gcc-6.4.0 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --syscon fdir=/etc --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html
    -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-c
    ygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/u
    sr/lib --enable-shared --enable-shared-libgcc --enable-static --enable-v ersion-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit -- with-dwarf2 --with-tune=generic --enable-languages=ada,c,c++,fortran,lto ,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomi
    c --enable-libcilkrts --enable-libgomp --enable-libitm --enable-libquadm
    ath --enable-libquadmath-support --enable-libssp --enable-libada --disab le-symvers --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include /cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-sys tem-zlib --enable-linker-build-id --with-default-libstdcxx-abi=gcc4-comp
    atible
    Thread model: posix
    gcc version 6.4.0 (GCC)

    'Tommi

    Binkd 1.1a-96 (Dec 11 2017 08:26:08/CYGWIN_NT-6.1)
    Compilation flags: gcc, zlib, bzlib2, https, amiga_4d_outbound, bwlim. Facilities: fts5004 ipv6
    ---
    * Origin: ==================================== (2:221/1)
  • From Janne Johansson@2:221/6 to Tommi Koivula on Wed Dec 13 14:34:00 2017
    If we are at "warnings at compile time", MacOS clang thinks this about
    current binkd sources:

    Making depends...
    Compiling ftnq.c...
    ftnq.c:181:16: warning: comparison of array 'fn->pwd' equal to a null
    pointer is always false [-Wtautological-pointer-compare]
    fn->pwd == NULL || strcmp(fn->pwd, "-") == 0)
    ~~~~^~~ ~~~~
    ftnq.c:319:33: warning: comparison of array 'node->pwd' equal to a null
    pointer is always false [-Wtautological-pointer-compare]
    if (node == NULL || node->pwd == NULL || strcmp(node->pwd, "-") == 0)
    ~~~~~~^~~ ~~~~
    2 warnings generated.
    Compiling protocol.c...
    protocol.c:1262:17: warning: address of array 'pn->pwd' will always
    evaluate to 'true' [-Wpointer-bool-conversion]
    if (pn->pwd && strcmp(pn->pwd, "-") && state->to == 0)
    ~~~~^~~ ~~
    protocol.c:1405:21: warning: address of array 'pn->pwd' will always
    evaluate to 'true' [-Wpointer-bool-conversion]
    if (pn && pn->pwd && strcmp(pn->pwd, "-") && state->to == 0)
    ~~ ~~~~^~~
    protocol.c:1419:17: warning: address of array 'pn->pwd' will always
    evaluate to 'true' [-Wpointer-bool-conversion]
    if (pn->pwd && strcmp(pn->pwd, "-"))
    ~~~~^~~ ~~
    protocol.c:1432:17: warning: address of array 'pn->pwd' will always
    evaluate to 'true' [-Wpointer-bool-conversion]
    if (pn->pwd && strcmp(pn->pwd, "-"))
    ~~~~^~~ ~~
    4 warnings generated.
    Compiling ftnnode.c...
    ftnnode.c:150:18: warning: address of array 'pn->pwd' will always
    evaluate to 'true' [-Wpointer-bool-conversion]
    && (!pn->pwd || strcmp(pn->pwd, "-") == 0)
    ~~~~~^~~
    1 warning generated.
    Compiling unix/daemonize.c...
    unix/daemonize.c:33:5: warning: 'daemon' is deprecated: first deprecated
    in macOS 10.5 - Use posix_spawn APIs instead. [-Wdeprecated-declarations]
    if (daemon(nochdir, 0) == -1)
    ^
    /usr/include/stdlib.h:293:6: note: 'daemon' has been explicitly marked deprecated here
    int daemon(int, int) __DARWIN_1050(daemon) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_0, __MAC_10_5, __IPHONE_2_0, __IPHONE_2_0, "Us...
    ^
    1 warning generated.

    It does produce an runnable executable,
    $ ./binkd -v
    Binkd 1.1a-96 (Dec 13 2017 13:27:11/Darwin)
    $ cc -v
    Apple LLVM version 9.0.0 (clang-900.0.39.2)
    Target: x86_64-apple-darwin17.3.0
    ....

    but some of the warnings might point out logic that really isn't doing
    what was expected, like the inverted pointers.

    ---
    * Origin: *** nntp://fidonews.mine.nu *** Finland *** (2:221/6.0)