[nadc_tools] fixed clang complains about extended-offsetof and a few minor bugs