Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor: db_dump: compiler warnings on mips #2271

Closed
karlp opened this issue Aug 3, 2021 · 1 comment
Closed

minor: db_dump: compiler warnings on mips #2271

karlp opened this issue Aug 3, 2021 · 1 comment
Labels
Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. Type: Bug
Milestone

Comments

@karlp
Copy link
Contributor

karlp commented Aug 3, 2021

Same code still exists on master and fixes branches. Probably should be %zu instead of %ld as it's a sizeof/size_t value.

make[5]: Entering directory '/home/karlp/src/smartgate_firmware/openwrt-master/build_dir/target-mips_24kc_musl/mosquitto-nossl/mosquitto-2.0.11/apps/db_dump'
ccache_cc -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -fmacro-prefix-map=/home/karlp/src/smartgate_firmware/openwrt-master/build_dir/target-mips_24kc_musl/mosquitto-nossl/mosquitto-2.0.11=mosquitto-2.0.11 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -I/home/karlp/src/smartgate_firmware/openwrt-master/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/usr/include -I/home/karlp/src/smartgate_firmware/openwrt-master/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/include/fortify -I/home/karlp/src/smartgate_firmware/openwrt-master/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/include  -I../../include -I../../ -I../../lib -I../../src -I../../deps -DWITH_BROKER -DWITH_PERSISTENCE -c db_dump.c -o db_dump.o
db_dump.c: In function 'dump__cfg_chunk_process':
db_dump.c:133:98: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'unsigned int' [-Wformat=]
   fprintf(stderr, "Error: Incompatible database configuration (dbid size is %d bytes, expected %ld)",
                                                                                                ~~^
                                                                                                %d
     chunk.dbid_size, sizeof(dbid_t));
                      ~~~~~~~~~~~~~~
@ralight ralight added Status: Accepted It's clear what the subject of the issue is about, and what the resolution should be. Type: Bug labels Aug 20, 2021
@ralight
Copy link
Contributor

ralight commented Aug 20, 2021

Thanks, I'll sort it.

@ralight ralight added this to the 2.0.12 milestone Aug 20, 2021
@ralight ralight added Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. and removed Status: Accepted It's clear what the subject of the issue is about, and what the resolution should be. labels Aug 24, 2021
@ralight ralight closed this as completed in f952d19 Sep 1, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants