Subject: | check_member only works if member is a scalar value |
If the member is a struct type, for instance, the compiler will generate a message like:
t.c: In function ‘main’:
t.c:12:7: error: used struct type value where scalar is required
if( check_aggr.left_record_entry )
This is while using the following struct:
typedef struct MMDB_search_node_s {
uint64_t left_record;
uint64_t right_record;
uint8_t left_record_type;
uint8_t right_record_type;
MMDB_entry_s left_record_entry;
MMDB_entry_s right_record_entry;
} MMDB_search_node_s;