Actions
Bug #4786
closedbssmap_le + bsslap tests compiler warning on i386
Start date:
10/09/2020
Due date:
% Done:
80%
Spec Reference:
Description
See https://build.opensuse.org/public/build/network:osmocom:nightly/Debian_9.0/i586/libosmocore/_log and all other 32bit builds:
format string problems¶
[ 372s] bsslap/bsslap_test.c: In function 'test_bsslap_enc_dec': [ 372s] bsslap/bsslap_test.c:64:15: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int' [-Wformat=] [ 372s] printf("[%ld] %s: ERROR: failed to encode pdu\n", (pdu - bsslap_test_pdus), [ 372s] ^ [ 372s] bsslap/bsslap_test.c:69:15: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int' [-Wformat=] [ 372s] printf("[%ld] %s: ERROR: osmo_bsslap_enc() returned length %d but msgb has %d bytes\n", [ 372s] ^ [ 372s] bsslap/bsslap_test.c:78:15: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int' [-Wformat=] [ 372s] printf("[%ld] %s: ERROR: failed to decode pdu: %s\n", (pdu - bsslap_test_pdus), [ 372s] ^ [ 372s] bsslap/bsslap_test.c:85:15: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int' [-Wformat=] [ 372s] printf("[%ld] %s: ERROR: decoded PDU != encoded PDU\n", (pdu - bsslap_test_pdus), [ 372s] ^ [ 372s] bsslap/bsslap_test.c:92:14: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int' [-Wformat=] [ 372s] printf("[%ld] %s: ok\n", (pdu - bsslap_test_pdus), osmo_bsslap_msgt_name(pdu->msg_type)); [ 372s] ^ [ 372s] /bin/bash ../libtool --tag=CC --mode=link gcc -Wall -pthread -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -DBUILDING_LIBOSMOCORE -Wall -no-install -Wl,-z,relro -Wl,-z,now -o bsslap/bsslap_test bsslap/bsslap_test.o ../src/libosmocore.la -ltalloc ../src/gsm/libosmogsm.la [ 372s] libtool: link: gcc -Wall -pthread -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -DBUILDING_LIBOSMOCORE -Wall -Wl,-z -Wl,relro -Wl,-z -Wl,now -o bsslap/bsslap_test bsslap/bsslap_test.o ../src/.libs/libosmocore.so -ltalloc ../src/gsm/.libs/libosmogsm.so -pthread -Wl,-rpath -Wl,/usr/src/packages/BUILD/src/.libs -Wl,-rpath -Wl,/usr/src/packages/BUILD/src/gsm/.libs [ 372s] gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -DBUILDING_LIBOSMOCORE -Wall -Wall -pthread -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -DBUILDING_LIBOSMOCORE -Wall -c -o bssmap_le/bssmap_le_test.o bssmap_le/bssmap_le_test.c [ 372s] bssmap_le/bssmap_le_test.c: In function 'test_bssmap_le_enc_dec': [ 372s] bssmap_le/bssmap_le_test.c:141:15: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int' [-Wformat=] [ 372s] printf("[%ld] %s: ERROR: failed to encode pdu\n", (pdu - bssmap_le_test_pdus), [ 372s] ^ [ 372s] bssmap_le/bssmap_le_test.c:150:15: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int' [-Wformat=] [ 372s] printf("[%ld] %s: ERROR: failed to decode pdu: %s\n", (pdu - bssmap_le_test_pdus), [ 372s] ^ [ 372s] bssmap_le/bssmap_le_test.c:157:15: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int' [-Wformat=] [ 372s] printf("[%ld] %s: ERROR: decoded PDU != encoded PDU\n", (pdu - bssmap_le_test_pdus), [ 372s] ^ [ 372s] bssmap_le/bssmap_le_test.c:165:14: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int' [-Wformat=] [ 372s] printf("[%ld] %s: ok (encoded len = %d)\n", (pdu - bssmap_le_test_pdus), [ 372s] ^
Related issues
Updated by laforge over 3 years ago
- Related to Bug #4787: libosmocore test suite failures on i386 added
Updated by laforge over 3 years ago
- Subject changed from bssmap_le + bsslap tets fail on i386 to bssmap_le + bsslap tests compiler warning on i386
Updated by laforge over 3 years ago
- Status changed from New to In Progress
- Assignee changed from neels to laforge
- % Done changed from 0 to 80
Updated by laforge over 3 years ago
- Related to Bug #4789: no gerrit verifications on a 32bit architecture added
Updated by laforge over 3 years ago
- Status changed from In Progress to Resolved
OBS build on i386 passes
Actions