Skip to content

check build warnings on newer systems (UBuntu 24, Fedora 41, 42 ,..) #168

Description

@alorbach

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions