You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The constant is scoped as "static" so it doesn't create a linker error, but it still creates a separate instance of this global variable for each time the header is included.
Confirmed by checking cf.so and observing that each of these 8 fields occur in the binary file 8 times:
Calling this a "bug" because space efficiency is one of the core requirements/expectations of this CF implementation, and this is not meeting that expectation. Plus, instantiating values from a header file is against most/all standards - it is not expected that simple inclusion of a header will cause extra memory to be allocated in the binary.
Nothing outside of the codec code should need to know about the bitfields
in the CFDP protocol definition. Everything else uses logical values.
This moves all DECLARE_FIELD macros into cf_codec.c and removes cf_field.h.
The FSW has a macro called "DECLARE_FIELD" which creates a constant at global scope:
CF/fsw/src/cf_field.h
Lines 54 to 55 in 7b99b91
The constant is scoped as "static" so it doesn't create a linker error, but it still creates a separate instance of this global variable for each time the header is included.
Confirmed by checking
cf.so
and observing that each of these 8 fields occur in the binary file 8 times:CF/fsw/src/cf_cfdp_pdu.h
Lines 73 to 80 in 7b99b91
The text was updated successfully, but these errors were encountered: