-
Type: Bug
-
Resolution: Duplicate
-
Priority: Trivial - P5
-
None
-
Affects Version/s: None
-
Component/s: BSON
-
None
Compiling the extension spits several warnings:
gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wall -g -std=c99 -m64 -o bson_native.o -c bson_native.c BUILDSTDERR: In file included from bson_native.c:21: BUILDSTDERR: native-endian.h:196:15: warning: '__bson_double_swap_slow' defined but not used [-Wunused-function] BUILDSTDERR: 196 | static double __bson_double_swap_slow(double v) BUILDSTDERR: | ^~~~~~~~~~~~~~~~~~~~~~~ BUILDSTDERR: native-endian.h:169:17: warning: '__bson_uint64_swap_slow' defined but not used [-Wunused-function] BUILDSTDERR: 169 | static uint64_t __bson_uint64_swap_slow(uint64_t v) BUILDSTDERR: | ^~~~~~~~~~~~~~~~~~~~~~~ BUILDSTDERR: native-endian.h:145:17: warning: '__bson_uint32_swap_slow' defined but not used [-Wunused-function] BUILDSTDERR: 145 | static uint32_t __bson_uint32_swap_slow(uint32_t v) BUILDSTDERR: | ^~~~~~~~~~~~~~~~~~~~~~~
These functions should be probably conditionalized by platform or they should be inline instead of static?
Here is some SO discussion on this topic:
https://stackoverflow.com/questions/2845748/function-defined-but-not-used-warning-in-c
- duplicates
-
RUBY-1969 Organize bson-ruby C extension code
- Closed