ECP-VeloC / AXL

Asynchronous Transfer Library
MIT License
2 stars 8 forks source link

Enable -Wall -Werror by default, fix compiler warnings #54

Closed tonyhutter closed 5 years ago

tonyhutter commented 5 years ago
CamStan commented 5 years ago

Apparently this:

/home/travis/build/ECP-VeloC/AXL/test/axl_cp.c:89:32: error: suggest braces
      around initialization of subobject [-Werror,-Wmissing-braces]
    struct sigaction action = {0};
                               ^
                               {}

was considered a bug in GCC 4.9 and they "fixed" it (here), although with some ongoing discussion around it. They suggest to just ignore the -Wmissing-braces warning. Some also consider it a bug in Clang (here), while others suggest that this: https://github.com/ECP-VeloC/AXL/blob/7e60afd733dd07d9efb9e7cd5587e97c5510a611/test/axl_cp.c#L89 should be

struct sigaction action = {{0}};
                          ^   ^

in C/C++.

tonyhutter commented 5 years ago

@CamStan thanks for the info. I just switched it to a memset() in my latest push to be super compatible with everything.