pmem / pmemstream

Other
9 stars 13 forks source link

Fix GCC ABI warning about flexible array member #247

Closed KFilipek closed 2 years ago

KFilipek commented 2 years ago

There are 2 ways of mitigating ABI warning. The first one is to avoid copying structures with a flexible array member by using pointers. The second is to change structures declarations, e.g.:

struct span_timestamped_base {
    struct span_base span_base;
    uint64_t timestamp;
};

struct span_entry {
    struct span_timestamped_base span_base;
    uint64_t data[];
};

This change is Reviewable

karczex commented 2 years ago

src/span.c line 63 at r1 (raw file):

Previously, lukaszstolarczuk (Łukasz Stolarczuk) wrote…
:+1:

👍