nasa / bplib

Apache License 2.0
27 stars 13 forks source link

disabling UNITTESTS yields empty translation units #34

Closed jphickey closed 4 years ago

jphickey commented 4 years ago

Source files like unittest/ut_rh_hash.c are always compiled, but if UNITTESTS is disabled then this file is effectively empty. ISO C forbids empty translation units (although gcc allows it unless you turn on pedantic mode).

These files should be removed from the makefile if UNITTESTS is disabled, not #ifdef'd out.

jpswinski commented 4 years ago

Fixed - the unit test files are only compiled when UNITTESTS is set, and the UNITTESTS #ifdef is used only for whether or not the unit test functions are called.

ff7d72cca1a5957d5bd527e571d553e8b3848088