gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] ✘STRUCTARRAY() warnings


From: Gary E. Miller
Subject: [gpsd-dev] ✘STRUCTARRAY() warnings
Date: Fri, 14 Jun 2019 15:29:51 -0700

Yo All!

Some of Fred's OS have many warnings like this:

MacSLS: rtcm2_json.c: In function 'json_rtcm2_read':
MacSLS: rtcm2_json.c:64: warning: initialized field overwritten
MacSLS: rtcm2_json.c:64: warning: (near initialization for 'json_rtcm1[8].addr.a
rray')

They have been around a long time, but not on any OS I run.

Here is the code:

    const struct json_attr_t json_rtcm1[] = {
        RTCM2_HEADER
        {"satellites", t_array, STRUCTARRAY(rtcm2->gps_ranges.sat,
                                            rtcm1_satellite, &satcount)},
        {NULL},
    };

The problem is from json.h, this macro:

#define STRUCTARRAY(a, e, n) \
        .addr.array.element_type = t_structobject, \
        .addr.array.arr.objects.subtype = e, \
        .addr.array.arr.objects.base = (char*)a, \
        .addr.array.arr.objects.stride = sizeof(a[0]), \
        .addr.array.count = n, \
        .addr.array.maxlen = NITEMS(a)

Anyone got a clue?

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin

Attachment: pgpLe6Sa6pwSX.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]