balint256/gr-baz

Warning when compiling baz_burster

u0m3 opened this issue · 0 comments

u0m3 commented

I get the following warnings when compiling master branch pulled today on Fedora 20 x86_64:

[ 39%] Building CXX object lib/CMakeFiles/gnuradio-baz.dir/baz_burster.cc.o
In file included from /usr/include/string.h:32:0,
                 from /usr/include/c++/4.8.3/cstring:42,
                 from /usr/include/boost/date_time/posix_time/conversion.hpp:12,
                 from /usr/include/boost/thread/xtime.hpp:16,
                 from /usr/include/boost/thread/pthread/mutex.hpp:17,
                 from /usr/include/boost/thread/mutex.hpp:16,
                 from /usr/include/boost/thread/pthread/thread_data.hpp:13,
                 from /usr/include/boost/thread/thread_only.hpp:17,
                 from /usr/include/boost/thread/thread.hpp:12,
                 from /home/alex/Documents/gr-baz/lib/baz_burster.h:32,
                 from /home/alex/Documents/gr-baz/lib/baz_burster.cc:34:
/home/alex/Documents/gr-baz/lib/baz_burster.cc: In constructor ‘baz_burster::baz_burster(const baz_burster_config&)’:
/home/alex/Documents/gr-baz/lib/baz_burster.cc:58:57: warning: invalid access to non-static data member ‘baz_burster::d_dummy_zero_last’  of NULL object [-Winvalid-offsetof]
  memset(&d_dummy_zero_first, 0x00, offsetof(baz_burster,d_dummy_zero_last) - offsetof(baz_burster,d_dummy_zero_first));
                                                         ^
/home/alex/Documents/gr-baz/lib/baz_burster.cc:58:57: warning: (perhaps the ‘offsetof’ macro was used incorrectly) [-Winvalid-offsetof]
/home/alex/Documents/gr-baz/lib/baz_burster.cc:58:99: warning: invalid access to non-static data member ‘baz_burster::<anonymous union>::d_dummy_zero_first’  of NULL object [-Winvalid-offsetof]
  memset(&d_dummy_zero_first, 0x00, offsetof(baz_burster,d_dummy_zero_last) - offsetof(baz_burster,d_dummy_zero_first));
                                                                                                   ^
/home/alex/Documents/gr-baz/lib/baz_burster.cc:58:99: warning: (perhaps the ‘offsetof’ macro was used incorrectly) [-Winvalid-offsetof]
/home/alex/Documents/gr-baz/lib/baz_burster.cc:58:99: warning: invalid access to non-static data member ‘baz_burster::<anonymous>’  of NULL object [-Winvalid-offsetof]
/home/alex/Documents/gr-baz/lib/baz_burster.cc:58:99: warning: (perhaps the ‘offsetof’ macro was used incorrectly) [-Winvalid-offsetof]
[ 41%] Building CXX object lib/CMakeFiles/gnuradio-baz.dir/baz_radar_detector.cc.o