Skip to content

Build fails with -Werror: warning: passing argument 1 of ‘__inline_isnanf’ as ‘float’ rather than ‘double’ due to prototype #1012

@barracuda156

Description

@barracuda156
--->  Configuring cjson
Warning: ccache_dir /opt/local/var/macports/build/.ccache could not be initialized; disabling ccache: couldn't execute "ccache": no such file or directory
        (using ccache)
Executing:  cd "/opt/local/var/macports/build/cjson-f14d8dea/work/build" && /opt/local/bin/cmake -G "CodeBlocks - Unix Makefiles" -DCMAKE_BUILD_TYPE=MacPorts -DCMAKE_INSTALL_PREFIX="/opt/local" -DCMAKE_INSTALL_NAME_DIR="/opt/local/lib" -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_OBJC_COMPILER="$CC" -DCMAKE_OBJCXX_COMPILER="$CXX" -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_POLICY_DEFAULT_CMP0060=NEW -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_MAKE_PROGRAM=/usr/bin/make -DCMAKE_MODULE_PATH="/opt/local/share/cmake/Modules" -DCMAKE_PREFIX_PATH="/opt/local/share/cmake/Modules" -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON -DCMAKE_INSTALL_RPATH="/opt/local/lib" -Wno-dev -DBUILD_SHARED_AND_STATIC_LIBS=ON -DENABLE_CJSON_UTILS=ON -DENABLE_CJSON_TEST=OFF -DCMAKE_OSX_ARCHITECTURES="ppc" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.6" -DCMAKE_OSX_SYSROOT="/" /opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19 
-- The C compiler identification is GNU 4.2.1
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc-4.2 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test FLAG_SUPPORTED_stdc89
-- Performing Test FLAG_SUPPORTED_stdc89 - Success
-- Performing Test FLAG_SUPPORTED_pedantic
-- Performing Test FLAG_SUPPORTED_pedantic - Success
-- Performing Test FLAG_SUPPORTED_Wall
-- Performing Test FLAG_SUPPORTED_Wall - Success
-- Performing Test FLAG_SUPPORTED_Wextra
-- Performing Test FLAG_SUPPORTED_Wextra - Success
-- Performing Test FLAG_SUPPORTED_Werror
-- Performing Test FLAG_SUPPORTED_Werror - Success
-- Performing Test FLAG_SUPPORTED_Wstrictprototypes
-- Performing Test FLAG_SUPPORTED_Wstrictprototypes - Success
-- Performing Test FLAG_SUPPORTED_Wwritestrings
-- Performing Test FLAG_SUPPORTED_Wwritestrings - Success
-- Performing Test FLAG_SUPPORTED_Wshadow
-- Performing Test FLAG_SUPPORTED_Wshadow - Success
-- Performing Test FLAG_SUPPORTED_Winitself
-- Performing Test FLAG_SUPPORTED_Winitself - Success
-- Performing Test FLAG_SUPPORTED_Wcastalign
-- Performing Test FLAG_SUPPORTED_Wcastalign - Success
-- Performing Test FLAG_SUPPORTED_Wformat2
-- Performing Test FLAG_SUPPORTED_Wformat2 - Success
-- Performing Test FLAG_SUPPORTED_Wmissingprototypes
-- Performing Test FLAG_SUPPORTED_Wmissingprototypes - Success
-- Performing Test FLAG_SUPPORTED_Wstrictoverflow2
-- Performing Test FLAG_SUPPORTED_Wstrictoverflow2 - Success
-- Performing Test FLAG_SUPPORTED_Wcastqual
-- Performing Test FLAG_SUPPORTED_Wcastqual - Success
-- Performing Test FLAG_SUPPORTED_Wundef
-- Performing Test FLAG_SUPPORTED_Wundef - Success
-- Performing Test FLAG_SUPPORTED_Wswitchdefault
-- Performing Test FLAG_SUPPORTED_Wswitchdefault - Success
-- Performing Test FLAG_SUPPORTED_Wconversion
-- Performing Test FLAG_SUPPORTED_Wconversion - Success
-- Performing Test FLAG_SUPPORTED_Wccompat
-- Performing Test FLAG_SUPPORTED_Wccompat - Success
-- Performing Test FLAG_SUPPORTED_fstackprotectorstrong
-- Performing Test FLAG_SUPPORTED_fstackprotectorstrong - Failed
-- Performing Test FLAG_SUPPORTED_Wcomma
-- Performing Test FLAG_SUPPORTED_Wcomma - Failed
-- Performing Test FLAG_SUPPORTED_Wdoublepromotion
-- Performing Test FLAG_SUPPORTED_Wdoublepromotion - Failed
-- Performing Test FLAG_SUPPORTED_Wparentheses
-- Performing Test FLAG_SUPPORTED_Wparentheses - Success
-- Performing Test FLAG_SUPPORTED_Wformatoverflow
-- Performing Test FLAG_SUPPORTED_Wformatoverflow - Failed
-- Performing Test FLAG_SUPPORTED_Wunusedmacros
-- Performing Test FLAG_SUPPORTED_Wunusedmacros - Success
-- Performing Test FLAG_SUPPORTED_Wmissingvariabledeclarations
-- Performing Test FLAG_SUPPORTED_Wmissingvariabledeclarations - Failed
-- Performing Test FLAG_SUPPORTED_Wusedbutmarkedunused
-- Performing Test FLAG_SUPPORTED_Wusedbutmarkedunused - Failed
-- Performing Test FLAG_SUPPORTED_Wswitchenum
-- Performing Test FLAG_SUPPORTED_Wswitchenum - Success
-- Performing Test FLAG_SUPPORTED_fvisibilityhidden
-- Performing Test FLAG_SUPPORTED_fvisibilityhidden - Success
-- Configuring done (11.8s)
-- Generating done (0.1s)
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_CXX_COMPILER
    CMAKE_OBJCXX_COMPILER
    CMAKE_OBJC_COMPILER
    CMAKE_POLICY_DEFAULT_CMP0025


-- Build files have been written to: /opt/local/var/macports/build/cjson-f14d8dea/work/build
--->  Building cjson
Executing:  cd "/opt/local/var/macports/build/cjson-f14d8dea/work/build" && /usr/bin/make -j2 -w all VERBOSE=ON 
make: Entering directory `/opt/local/var/macports/build/cjson-f14d8dea/work/build'
/opt/local/bin/cmake -S/opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19 -B/opt/local/var/macports/build/cjson-f14d8dea/work/build --check-build-system CMakeFiles/Makefile.cmake 0
/opt/local/bin/cmake -E cmake_progress_start /opt/local/var/macports/build/cjson-f14d8dea/work/build/CMakeFiles /opt/local/var/macports/build/cjson-f14d8dea/work/build//CMakeFiles/progress.marks
/usr/bin/make  -f CMakeFiles/Makefile2 all
make[1]: Entering directory `/opt/local/var/macports/build/cjson-f14d8dea/work/build'
/usr/bin/make  -f CMakeFiles/cjson.dir/build.make CMakeFiles/cjson.dir/depend
/usr/bin/make  -f CMakeFiles/cjson-static.dir/build.make CMakeFiles/cjson-static.dir/depend
make[2]: Entering directory `/opt/local/var/macports/build/cjson-f14d8dea/work/build'
cd /opt/local/var/macports/build/cjson-f14d8dea/work/build && /opt/local/bin/cmake -E cmake_depends "Unix Makefiles" /opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19 /opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19 /opt/local/var/macports/build/cjson-f14d8dea/work/build /opt/local/var/macports/build/cjson-f14d8dea/work/build /opt/local/var/macports/build/cjson-f14d8dea/work/build/CMakeFiles/cjson.dir/DependInfo.cmake "--color="
make[2]: Entering directory `/opt/local/var/macports/build/cjson-f14d8dea/work/build'
cd /opt/local/var/macports/build/cjson-f14d8dea/work/build && /opt/local/bin/cmake -E cmake_depends "Unix Makefiles" /opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19 /opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19 /opt/local/var/macports/build/cjson-f14d8dea/work/build /opt/local/var/macports/build/cjson-f14d8dea/work/build /opt/local/var/macports/build/cjson-f14d8dea/work/build/CMakeFiles/cjson-static.dir/DependInfo.cmake "--color="
make[2]: Leaving directory `/opt/local/var/macports/build/cjson-f14d8dea/work/build'
/usr/bin/make  -f CMakeFiles/cjson-static.dir/build.make CMakeFiles/cjson-static.dir/build
make[2]: Leaving directory `/opt/local/var/macports/build/cjson-f14d8dea/work/build'
/usr/bin/make  -f CMakeFiles/cjson.dir/build.make CMakeFiles/cjson.dir/build
make[2]: Entering directory `/opt/local/var/macports/build/cjson-f14d8dea/work/build'
make[2]: Entering directory `/opt/local/var/macports/build/cjson-f14d8dea/work/build'
[ 12%] Building C object CMakeFiles/cjson-static.dir/cJSON.c.o
[ 25%] Building C object CMakeFiles/cjson.dir/cJSON.c.o
/usr/bin/gcc-4.2 -DCJSON_API_VISIBILITY -DCJSON_EXPORT_SYMBOLS -DENABLE_LOCALES  -pipe -Os -DNDEBUG -I/opt/local/include -std=c89 -pedantic -Wall -Wextra -Werror -Wstrict-prototypes -Wwrite-strings -Wshadow -Winit-self -Wcast-align -Wformat=2 -Wmissing-prototypes -Wstrict-overflow=2 -Wcast-qual -Wundef -Wswitch-default -Wconversion -Wc++-compat -Wparentheses -Wunused-macros -Wswitch-enum -fvisibility=hidden -arch ppc -mmacosx-version-min=10.6 -MD -MT CMakeFiles/cjson-static.dir/cJSON.c.o -MF CMakeFiles/cjson-static.dir/cJSON.c.o.d -o CMakeFiles/cjson-static.dir/cJSON.c.o -c /opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c
/usr/bin/gcc-4.2 -DCJSON_API_VISIBILITY -DCJSON_EXPORT_SYMBOLS -DENABLE_LOCALES -Dcjson_EXPORTS  -pipe -Os -DNDEBUG -I/opt/local/include -std=c89 -pedantic -Wall -Wextra -Werror -Wstrict-prototypes -Wwrite-strings -Wshadow -Winit-self -Wcast-align -Wformat=2 -Wmissing-prototypes -Wstrict-overflow=2 -Wcast-qual -Wundef -Wswitch-default -Wconversion -Wc++-compat -Wparentheses -Wunused-macros -Wswitch-enum -fvisibility=hidden -arch ppc -mmacosx-version-min=10.6 -fPIC -MD -MT CMakeFiles/cjson.dir/cJSON.c.o -MF CMakeFiles/cjson.dir/cJSON.c.o.d -o CMakeFiles/cjson.dir/cJSON.c.o -c /opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c
cc1: warnings being treated as errors
/opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c: In function ‘print_number’:
/opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c:607: warning: passing argument 1 of ‘__inline_isnanf’ as ‘float’ rather than ‘double’ due to prototype
cc1: warnings being treated as errors
/opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c: In function ‘print_number’:
/opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c:607: warning: passing argument 1 of ‘__inline_isnanf’ as ‘float’ rather than ‘double’ due to prototype
/opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c:607: warning: passing argument 1 of ‘__inline_isinff’ as ‘float’ rather than ‘double’ due to prototype
/opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c:607: warning: passing argument 1 of ‘__inline_isinff’ as ‘float’ rather than ‘double’ due to prototype
/opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c: In function ‘get_array_item’:
/opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c:1907: warning: declaration of ‘index’ shadows a global declaration
/opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c: In function ‘get_array_item’:
/opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c:1907: warning: declaration of ‘index’ shadows a global declaration
/usr/include/string.h:125: warning: shadowed declaration is here
/opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c: In function ‘cJSON_GetArrayItem’:
/opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c:1926: warning: declaration of ‘index’ shadows a global declaration
/usr/include/string.h:125: warning: shadowed declaration is here
/opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c: In function ‘cast_away_const’:
/opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c:2060: warning: cast discards qualifiers from pointer target type
/usr/include/string.h:125: warning: shadowed declaration is here
/opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c: In function ‘cJSON_GetArrayItem’:
/opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c:1926: warning: declaration of ‘index’ shadows a global declaration
/usr/include/string.h:125: warning: shadowed declaration is here
/opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c: In function ‘cast_away_const’:
/opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c:2060: warning: cast discards qualifiers from pointer target type
/opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c: In function ‘cJSON_CreateIntArray’:
/opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c:2622: warning: passing argument 1 of ‘cJSON_CreateNumber’ as floating rather than integer due to prototype
/opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c: In function ‘cJSON_CreateIntArray’:
/opt/local/var/macports/build/cjson-f14d8dea/work/cJSON-1.7.19/cJSON.c:2622: warning: passing argument 1 of ‘cJSON_CreateNumber’ as floating rather than integer due to prototype
make[2]: *** [CMakeFiles/cjson-static.dir/cJSON.c.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/cjson-f14d8dea/work/build'
make[1]: *** [CMakeFiles/cjson-static.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/cjson.dir/cJSON.c.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/cjson-f14d8dea/work/build'
make[1]: *** [CMakeFiles/cjson.dir/all] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/cjson-f14d8dea/work/build'
make: *** [all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions