You are here: Home » Topic » mt-daapd-svn-1400: some compiler warnings removed

mt-daapd-svn-1400: some compiler warnings removed

This topic contains 1 reply, has 1 voice, and was last updated by  rpedde 11 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #689

    servies

    They don’t caused any troubles in my case but I find them annoying during compile time.
    My system is a Fedora Core 4 Linux box. I didn’t test the patches on other architectures as I don’t have them…

    The warnings:

    xml-rpc.c: In function 'xml_init':
    xml-rpc.c:217: warning: implicit declaration of function 'strcasestr'
    ...
    mp3-scanner.c: In function ‘scan_is_compdir’:
    mp3-scanner.c:304: warning: implicit declaration of function ‘strcasestr’
    ...
    scan-xml.c: In function ‘scan_xml_datedecode’:
    scan-xml.c:133: warning: implicit declaration of function ‘strptime’
    ...
    smart-parser.c: In function ‘sp_isdate’:
    smart-parser.c:449: warning: implicit declaration of function ‘strptime’
    ...
    plugin.c: In function ‘pi_stream’:
    plugin.c:879: warning: implicit declaration of function ‘strncasecmp’
    ...
    db-sql-sqlite3.c: In function ‘db_sqlite3_event’:
    db-sql-sqlite3.c:359: warning: implicit declaration of function ‘conf_get_int’

    patch to remove these warnings:


    diff --recursive -C3 mt-daapd-svn-1400/src/db-sql-sqlite3.c mt-daapd-svn-1400.patch/src/db-sql-sqlite3.c
    *** mt-daapd-svn-1400/src/db-sql-sqlite3.c 2006-10-12 04:09:58.000000000 +0200
    --- mt-daapd-svn-1400.patch/src/db-sql-sqlite3.c 2006-10-18 21:48:03.000000000 +0200
    ***************
    *** 46,51 ****
    --- 46,52 ----
    # include
    #endif

    + #include "conf.h"
    #include "err.h"
    #include "db-generic.h"
    #include "db-sql.h"
    diff --recursive -C3 mt-daapd-svn-1400/src/mp3-scanner.c mt-daapd-svn-1400.patch/src/mp3-scanner.c
    *** mt-daapd-svn-1400/src/mp3-scanner.c 2006-10-18 05:48:30.000000000 +0200
    --- mt-daapd-svn-1400.patch/src/mp3-scanner.c 2006-10-18 21:45:25.000000000 +0200
    ***************
    *** 38,43 ****
    --- 38,44 ----
    #include
    #include
    #include
    + #define __USE_GNU
    #include
    #ifdef HAVE_DIRENT_H
    # include
    diff --recursive -C3 mt-daapd-svn-1400/src/plugin.c mt-daapd-svn-1400.patch/src/plugin.c
    *** mt-daapd-svn-1400/src/plugin.c 2006-10-09 07:06:16.000000000 +0200
    --- mt-daapd-svn-1400.patch/src/plugin.c 2006-10-18 21:47:08.000000000 +0200
    ***************
    *** 32,37 ****
    --- 32,38 ----
    #include
    #include
    #include
    + #include

    #include
    #include

    diff --recursive -C3 mt-daapd-svn-1400/src/plugins/xml-rpc.c mt-daapd-svn-1400.patch/src/plugins/xml-rpc.c
    *** mt-daapd-svn-1400/src/plugins/xml-rpc.c 2006-10-09 07:06:14.000000000 +0200
    --- mt-daapd-svn-1400.patch/src/plugins/xml-rpc.c 2006-10-18 21:43:46.000000000 +0200
    ***************
    *** 11,16 ****
    --- 11,17 ----
    #include
    #include
    #include
    + #define __USE_GNU
    #include
    #include
    #6857

    rpedde
    Participant

    @servies wrote:

    They don’t caused any troubles in my case but I find them annoying during compile time.
    My system is a Fedora Core 4 Linux box. I didn’t test the patches on other architectures as I don’t have them…

    Yeah, me too.. it’s because the files themselves sometime declare XOPEN or other different posix levels but don’t use the same on the configure check.

    I’m going to AC_USE_SYSTEM_EXTENSIONS to get it all cleaned up, so hopefully the _USE_GNU stuff won’t be necessary, but I’ll def roll in the strings one.

    I want to be able to compile on at least gcc4/linux and gcc4/mac with no warnings at -Wall.

    Clearly have my work cut out for me. 🙂

    Thanks.

    — Ron

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.