Skip to content

How to handle zero-length flexible array? #113

@huming2207

Description

@huming2207

Hi all,

May I ask how to handle a zero-length flexible array? For example here's the code in C++:

    struct __attribute__((packed)) cfg_pkt {
        nvs_type_t type : 8;
        uint16_t val_len;
        char ns[16];
        char key[16];
        uint8_t value[];
    };

The value[] is a flexible array member. How should I handle gracefully with this library?

Regards,
Jackson

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions