Build fails with -Werror: `warning: passing argument 1 of ‘__inline_isnanf’ as ‘float’ rather than ‘double’ due to prototype`
メンテナーはふだん 12 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
- 技術スタック
- c, cmake
- 領域
- build-system
調査の方向性
cJSON.c の print_number(607 行目付近)から始め、-Werror を指定した、示されている GCC 4.2/CMake 構成で失敗を再現します。cJSON.c 内の関連する警告を含むコンパイラ診断を確認し、この構成で報告された失敗なしにプロジェクトが正常にビルドされることを検証します。
索引モデルが issue の本文から書いたものです。
説明
---> 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
- 主要言語
- C
- スター
- 13k
- フォーク
- 3.5k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DaveGamble/cJSON のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
DaveGamble/cJSON#1106 ·
メンテナーはふだん 12 日以内に返信
-
Undefined-Behavior in function cJSON_SetNumberHelper対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
DaveGamble/cJSON#1100 · リアクション 1 件 ·
メンテナーはふだん 12 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
DaveGamble/cJSON#1094 · コメント 9 件 · リアクション 1 件 ·
メンテナーはふだん 12 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
DaveGamble/cJSON#1093 ·
メンテナーはふだん 12 日以内に返信
-
Use-after-free in cJSONUtils_ApplyPatches when a patch removes the patch array対応中かも @iliasabk が 30 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
DaveGamble/cJSON#1082 ·
メンテナーはふだん 12 日以内に返信
DaveGamble/cJSON の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
vercel-labs/zerolang#442 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
triage
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
mewencode: base256[] and base128[] are indexed out of bounds by a non-ASCII octet対応中かも @kazu-yamamoto が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
kazu-yamamoto/Mew#276 ·
メンテナーはふだん 1 日以内に返信
-
[iwm] transaction_get() copies the whole payload regardless of the length asked for対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
FujiNetWIFI/fujinet-firmware#2045 ·
メンテナーはふだん 1 日以内に返信