clixon: error: passing argument 2 of 'parse_uint64' from incompatible pointer type
Open
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
Maintainers: @pprindeville , @olofhagsand
Currently, clixon is failing for OpenWrt snapshots builds.
This is from arm_cortex-a9+vfpv3-d16_musl
Log:
cli_show.c:2105:43: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
2105 | cligen_output(stdout, "YANG-%s-%s-size: %" PRIu64 "\n", domain, name, sz);
| ^~~~~~~~~~~~~~~~~~~~ ~~
| |
| size_t {aka unsigned int}
In file included from cli_show.c:54:
/builder/shared-workdir/build/sdk/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-14.2.0_musl_eabi/include/inttypes.h:81:25: note: format string is defined here
81 | #define PRIu64 __PRI64 "u"
cli_show.c:2117:35: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
2117 | cligen_output(stdout, "YANG-total-size: %" PRIu64 "\n", tsz);
| ^~~~~~~~~~~~~~~~~~~~ ~~~
| |
| size_t {aka unsigned int}
/builder/shared-workdir/build/sdk/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-14.2.0_musl_eabi/include/inttypes.h:81:25: note: format string is defined here
81 | #define PRIu64 __PRI64 "u"
cli_show.c:2140:39: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
2140 | cligen_output(stdout, "CLIspec-%s-size: %" PRIu64 "\n", cligen_ph_name_get(ph), sz);
| ^~~~~~~~~~~~~~~~~~~~ ~~
| |
| size_t {aka unsigned int}
/builder/shared-workdir/build/sdk/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-14.2.0_musl_eabi/include/inttypes.h:81:25: note: format string is defined here
81 | #define PRIu64 __PRI64 "u"
cli_show.c:2145:35: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
2145 | cligen_output(stdout, "CLIspec-total-size: %" PRIu64 "\n", tsz);
| ^~~~~~~~~~~~~~~~~~~~~~~ ~~~
| |
| size_t {aka unsigned int}
/builder/shared-workdir/build/sdk/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-14.2.0_musl_eabi/include/inttypes.h:81:25: note: format string is defined here
81 | #define PRIu64 __PRI64 "u"
cli_show.c:2147:35: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
2147 | cligen_output(stdout, "Mem-Total-size: %" PRIu64 "\n", tsz0+tsz);
| ^~~~~~~~~~~~~~~~~~~ ~~~~~~~~
| |
| size_t {aka unsigned int}
/builder/shared-workdir/build/sdk/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-14.2.0_musl_eabi/include/inttypes.h:81:25: note: format string is defined here
81 | #define PRIu64 __PRI64 "u"
cli_show.c:2189:60: error: passing argument 2 of 'parse_uint64' from incompatible pointer type [-Wincompatible-pointer-types]
2189 | parse_uint64(xml_find_body(x, "size"), &sz, NULL);
| ^~~
| |
| size_t * {aka unsigned int *}
In file included from /builder/shared-workdir/build/sdk/staging_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/usr/include/cligen/cligen.h:59,
from cli_show.c:65:
/builder/shared-workdir/build/sdk/staging_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/usr/include/cligen/cligen_cv.h:197:39: note: expected 'uint64_t *' {aka 'long long unsigned int *'} but argument is of type 'size_t *' {aka 'unsigned int *'}
197 | int parse_uint64(char *str, uint64_t *val, char **reason);
| ~~~~~~~~~~^~~
cli_show.c:2214:60: error: passing argument 2 of 'parse_uint64' from incompatible pointer type [-Wincompatible-pointer-types]
2214 | parse_uint64(xml_find_body(x, "size"), &sz, NULL);
| ^~~
| |
| size_t * {aka unsigned int *}
/builder/shared-workdir/build/sdk/staging_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/usr/include/cligen/cligen_cv.h:197:39: note: expected 'uint64_t *' {aka 'long long unsigned int *'} but argument is of type 'size_t *' {aka 'unsigned int *'}
197 | int parse_uint64(char *str, uint64_t *val, char **reason);
| ~~~~~~~~~~^~~
make[6]: *** [Makefile:177: cli_show.o] Error 1
make[6]: Leaving directory '/builder/shared-workdir/build/sdk/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/clixon-7.4.0/apps/cli'
make[5]: *** [Makefile:66: cli] Error 2
make[5]: *** Waiting for unfinished jobs....
Full log:
https://downloads.openwrt.org/snapshots/faillogs/arm_cortex-a9_vfpv3-d16/packages/clixon/compile.txt
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with cli_show.c at the reported lines 2105-2214 and compare the size values with the parse_uint64 signature in cligen_cv.h. Reproduce the clixon package build for the arm_cortex-a9+vfpv3-d16_musl target using the linked compile log. Done means the package builds without the reported incompatible-pointer error or format warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100