check build warnings on newer systems (UBuntu 24, Fedora 41, 42 ,..)
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 61
- Forks
- 35
- Avg merge
- 21m
- Merged PRs (30d)
- 2
Description
Build fails on such systems because of Warnings, here a sample from fedora 41:
16.85 make all-recursive
16.86 make[1]: Entering directory '/home/devel/helper-projects/libfastjson'
16.86 Making all in .
16.86 make[2]: Entering directory '/home/devel/helper-projects/libfastjson'
16.87 CC libfastjson_la-json_print.lo
16.87 CC libfastjson_la-json_version.lo
16.87 CC libfastjson_la-json_object.lo
16.87 CC libfastjson_la-json_object_iterator.lo
16.98 json_object.c: In function 'fjson_object_new':
16.98 json_object.c:217:78: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
16.98 217 | struct fjson_object *const jso = (struct fjson_object*)calloc(sizeof(struct fjson_object), 1);
16.98 | ^~~~~~
16.98 json_object.c:217:78: note: earlier argument should specify number of elements, later size of each element
17.03 CC libfastjson_la-json_tokener.lo
17.06 CC libfastjson_la-json_util.lo
17.19 cc1: all warnings being treated as errors
17.19 make[2]: *** [Makefile:661: libfastjson_la-json_object.lo] Error 1
17.19 make[2]: *** Waiting for unfinished jobs....
18.14 make[2]: Leaving directory '/home/devel/helper-projects/libfastjson'
18.15 make[1]: *** [Makefile:753: all-recursive] Error 1
18.15 make[1]: Leaving directory '/home/devel/helper-projects/libfastjson'
18.15 make: *** [Makefile:477: all] Error 2
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 json_object.c at fjson_object_new and reproduce the reported make all-recursive failure on Fedora 41 or another newer system. Check the calloc warning and the surrounding build configuration; done means the project builds successfully with warnings treated as errors on the affected systems.
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
- Mostly clear
- Newbie friendliness
- 45/100