diff options
38 files changed, 75 insertions, 42 deletions
diff --git a/configure.ac b/configure.ac index 0986a9fdb..14e982b34 100644 --- a/configure.ac +++ b/configure.ac @@ -40,6 +40,13 @@ LF_CONFIGURE_CC LF_CONFIGURE_CXX GR_LIB64 dnl check for lib64 suffix after choosing compilers +cxx_warnings_as_errors="" +AC_ARG_ENABLE( + [warnings-as-errors], + [--enable-warnings-as-errors Treat compiler warnings as errors], + [cxx_warnings_as_errors="-Werror"] +) + dnl The three macros above are known to override CXXFLAGS if the user dnl didn't specify them. Though I'm sure somebody thought this was dnl a good idea, it makes it hard to use other than -g -O2 when compiling @@ -50,16 +57,16 @@ dnl the output of swig use use -O1 if we're using g++. dnl See Makefile.common for the rest of the magic. if test "$user_set_cxxflags" != yes; then autoconf_default_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="" + CXXFLAGS=$cxx_warnings_as_errors if test "$GXX" = yes; then case "$host_cpu" in powerpc*) dnl "-O1" is broken on the PPC for some reason dnl (at least as of g++ 4.1.1) - swig_CXXFLAGS="-g1 -O2" + swig_CXXFLAGS="-g1 -O2 -fno-strict-aliasing" ;; *) - swig_CXXFLAGS="-g -O1" + swig_CXXFLAGS="-g -O1 -fno-strict-aliasing" ;; esac fi @@ -246,7 +253,7 @@ GR_SUBVERSION dnl Component specific configuration dnl The order of the GR_ macros determines the order of compilation dnl For -any- checks on $enable_all_components -dnl use the following guildlines: +dnl use the following guidelines: dnl yes : --enable-all-components was specified, so error out if any dnl components do not pass configuration checks. dnl no : --disable-all-components was specified, so try to build the diff --git a/gnuradio-core/src/lib/bug_work_around_6.cc b/gnuradio-core/src/lib/bug_work_around_6.cc index 929c7f81d..b829360fc 100644 --- a/gnuradio-core/src/lib/bug_work_around_6.cc +++ b/gnuradio-core/src/lib/bug_work_around_6.cc @@ -1,3 +1,3 @@ // if libgrio has no sources, it doesn't get built correctly -static int gr_bug_work_around_6; +static int gr_bug_work_around_6 __attribute__((unused)); diff --git a/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccf.cc b/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccf.cc index 501ae336e..578506020 100644 --- a/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccf.cc +++ b/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccf.cc @@ -27,7 +27,7 @@ #include <gr_adaptive_fir_ccf.h> #include <gr_io_signature.h> -gr_adaptive_fir_ccf::gr_adaptive_fir_ccf(char *name, int decimation, const std::vector<float> &taps) +gr_adaptive_fir_ccf::gr_adaptive_fir_ccf(const char *name, int decimation, const std::vector<float> &taps) : gr_sync_decimator (name, gr_make_io_signature (1, 1, sizeof(gr_complex)), gr_make_io_signature (1, 1, sizeof(gr_complex)), diff --git a/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccf.h b/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccf.h index 6df0bf5b2..13d87e765 100644 --- a/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccf.h +++ b/gnuradio-core/src/lib/filter/gr_adaptive_fir_ccf.h @@ -46,7 +46,7 @@ protected: virtual void update_tap(float &tap, const gr_complex &in) = 0; public: - gr_adaptive_fir_ccf(char *name, int decimation, const std::vector<float> &taps); + gr_adaptive_fir_ccf(const char *name, int decimation, const std::vector<float> &taps); void set_taps(const std::vector<float> &taps); int work(int noutput_items, diff --git a/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.cc b/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.cc index 1083b181c..5f06a23b9 100644 --- a/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.cc +++ b/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.cc @@ -66,6 +66,7 @@ gr_fft_filter_ccc::~gr_fft_filter_ccc () delete d_invfft; } +#if 0 static void print_vector_complex(const std::string label, const std::vector<gr_complex> &x) { @@ -74,6 +75,7 @@ print_vector_complex(const std::string label, const std::vector<gr_complex> &x) std::cout << x[i] << " "; std::cout << "\n"; } +#endif void gr_fft_filter_ccc::set_taps (const std::vector<gr_complex> &taps) diff --git a/gnuradio-core/src/lib/filter/gr_fft_filter_fff.cc b/gnuradio-core/src/lib/filter/gr_fft_filter_fff.cc index 28ee3e070..dc9b616d9 100644 --- a/gnuradio-core/src/lib/filter/gr_fft_filter_fff.cc +++ b/gnuradio-core/src/lib/filter/gr_fft_filter_fff.cc @@ -58,6 +58,7 @@ gr_fft_filter_fff::~gr_fft_filter_fff () delete d_invfft; } +#if 0 static void print_vector_complex(const std::string label, const std::vector<gr_complex> &x) { @@ -75,6 +76,7 @@ print_vector_float(const std::string label, const std::vector<float> &x) std::cout << x[i] << " "; std::cout << "\n"; } +#endif void gr_fft_filter_fff::set_taps (const std::vector<float> &taps) diff --git a/gnuradio-core/src/lib/general/gr_iqcomp_cc.cc b/gnuradio-core/src/lib/general/gr_iqcomp_cc.cc index 19b81392e..e0a2c08ae 100644 --- a/gnuradio-core/src/lib/general/gr_iqcomp_cc.cc +++ b/gnuradio-core/src/lib/general/gr_iqcomp_cc.cc @@ -40,7 +40,8 @@ gr_iqcomp_cc::gr_iqcomp_cc (float mu) gr_make_io_signature (1, 1, sizeof (gr_complex))), d_mu (mu) { - float d_wi=0.0, d_wq=0.0; + d_wi=0.0; + d_wq=0.0; } int @@ -49,7 +50,7 @@ gr_iqcomp_cc::work (int noutput_items, gr_vector_void_star &output_items) { const gr_complex *iptr = (gr_complex *) input_items[0]; - gr_complex *optr = (gr_complex *) output_items[0]; + // gr_complex *optr = (gr_complex *) output_items[0]; for(int i = 0 ; i < noutput_items ; i++) { float i_out = iptr[i].real() - iptr[i].imag() * d_wq; diff --git a/gnuradio-core/src/lib/general/gr_ofdm_qam_mapper.cc b/gnuradio-core/src/lib/general/gr_ofdm_qam_mapper.cc index 433b3bc31..0f974069e 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_qam_mapper.cc +++ b/gnuradio-core/src/lib/general/gr_ofdm_qam_mapper.cc @@ -151,18 +151,20 @@ void gr_ofdm_qam_mapper::make_constellation() d_constellation_map[15] = gr_complex(3, 3); coeff = sqrt(31.0)/2.0; - for(i = 0; i < d_constellation_map.size(); i++) { + for(i = 0; i < static_cast<int>(d_constellation_map.size()); i++) { d_constellation_map[i] /= coeff; printf("const[%d]: %f + j%f\n", i, d_constellation_map[i].real(), d_constellation_map[i].imag()); } } +#if 0 static float randombit() { int r = rand()&1; return (float)(-1 + 2*r); } +#endif int gr_ofdm_qam_mapper::work(int noutput_items, diff --git a/gnuradio-core/src/lib/general/gr_stream_mux.cc b/gnuradio-core/src/lib/general/gr_stream_mux.cc index 8ba138471..e56974c50 100644 --- a/gnuradio-core/src/lib/general/gr_stream_mux.cc +++ b/gnuradio-core/src/lib/general/gr_stream_mux.cc @@ -86,7 +86,7 @@ gr_stream_mux::general_work(int noutput_items, if(VERBOSE) { printf("mux: nouput_items: %d d_stream: %d\n", noutput_items, d_stream); for(size_t i = 0; i < d_lengths.size(); i++) - printf("\tninput_items[%d]: %d\n", i, ninput_items[i]); + printf("\tninput_items[%zu]: %d\n", i, ninput_items[i]); } while (1) { diff --git a/gnuradio-core/src/lib/general/gri_fft.cc b/gnuradio-core/src/lib/general/gri_fft.cc index f6e28e1d1..509420d8a 100644 --- a/gnuradio-core/src/lib/general/gri_fft.cc +++ b/gnuradio-core/src/lib/general/gri_fft.cc @@ -37,7 +37,7 @@ static boost::mutex s_planning_mutex; static char * wisdom_filename () { - static char *filename = ".gr_fftw_wisdom"; + static const char *filename = ".gr_fftw_wisdom"; char *home = getenv ("HOME"); if (home){ diff --git a/gnuradio-core/src/lib/general/qa_gr_firdes.cc b/gnuradio-core/src/lib/general/qa_gr_firdes.cc index 5a41f118a..771249b2c 100644 --- a/gnuradio-core/src/lib/general/qa_gr_firdes.cc +++ b/gnuradio-core/src/lib/general/qa_gr_firdes.cc @@ -33,6 +33,7 @@ using std::vector; +#if 0 static void print_taps (std::ostream &s, vector<float> &v) { @@ -41,6 +42,7 @@ print_taps (std::ostream &s, vector<float> &v) printf ("tap[%2d] = %16.7e\n", i, v[i]); } } +#endif static void check_symmetry (vector<float> &v) diff --git a/gnuradio-core/src/lib/missing/bug_work_around_8.cc b/gnuradio-core/src/lib/missing/bug_work_around_8.cc index b79702275..b2cbdb3d9 100644 --- a/gnuradio-core/src/lib/missing/bug_work_around_8.cc +++ b/gnuradio-core/src/lib/missing/bug_work_around_8.cc @@ -1,2 +1,2 @@ // if libmisc has no sources, it doesn't get built correctly -static int gr_bug_work_around_8; +static int gr_bug_work_around_8 __attribute__((unused)); diff --git a/gr-atsc/src/lib/atsc_bit_timing_loop.cc b/gr-atsc/src/lib/atsc_bit_timing_loop.cc index dbd864be5..a661e708b 100644 --- a/gr-atsc/src/lib/atsc_bit_timing_loop.cc +++ b/gr-atsc/src/lib/atsc_bit_timing_loop.cc @@ -88,7 +88,7 @@ atsc_bit_timing_loop::work (int noutput_items, // We are tasked with producing output.size output samples. // We will consume approximately 2 * output.size input samples. - unsigned int k; // output index + int k; // output index float interp_sample; int symbol_index; diff --git a/gr-atsc/src/lib/atsc_depad.cc b/gr-atsc/src/lib/atsc_depad.cc index c72067e61..f1e830568 100644 --- a/gr-atsc/src/lib/atsc_depad.cc +++ b/gr-atsc/src/lib/atsc_depad.cc @@ -51,7 +51,7 @@ atsc_depad::work (int noutput_items, const atsc_mpeg_packet *in = (const atsc_mpeg_packet *) input_items[0]; unsigned char *out = (unsigned char *) output_items[0]; - unsigned int i; + int i; for (i = 0; i < noutput_items/ATSC_MPEG_PKT_LENGTH; i++){ memcpy(&out[i * ATSC_MPEG_PKT_LENGTH], in[i].data, ATSC_MPEG_PKT_LENGTH); diff --git a/gr-atsc/src/lib/atsc_field_sync_demux.cc b/gr-atsc/src/lib/atsc_field_sync_demux.cc index 333df92fb..b6195c6df 100644 --- a/gr-atsc/src/lib/atsc_field_sync_demux.cc +++ b/gr-atsc/src/lib/atsc_field_sync_demux.cc @@ -52,8 +52,8 @@ atsc_field_sync_demux::atsc_field_sync_demux() gr_make_io_signature(2, 2, sizeof(float)), gr_make_io_signature(1, 1, sizeof(atsc_soft_data_segment))), d_locked(false), d_in_field2(true), d_segment_number(0), - d_next_input(0), d_lost_index(0), d_inputs0_size(0), - d_inputs0_index(0), d_consume(0) + d_next_input(0), d_lost_index(0), d_inputs0_index(0), + d_inputs0_size(0), d_consume(0) { reset(); } @@ -102,7 +102,7 @@ atsc_field_sync_demux::work (int noutput_items, assert(sizeof(float) == sizeof(atsc::syminfo)); - int ii = 0; // input index + unsigned int ii = 0; // input index // Are we in sync? if (!tag_is_seg_sync_or_field_sync (input_tags[0])){ // No ... @@ -155,7 +155,7 @@ atsc_field_sync_demux::work (int noutput_items, while (k < noutput_items){ - if (d_inputs0_size - ii < ATSC_DATA_SEGMENT_LENGTH){ + if (d_inputs0_size - ii < static_cast<unsigned int>(ATSC_DATA_SEGMENT_LENGTH)){ // We're out of input data. cerr << "atsc_field_sync_demux: ran out of input data\n"; d_next_input += ii; // update for forecast diff --git a/gr-atsc/src/lib/atsc_field_sync_mux.cc b/gr-atsc/src/lib/atsc_field_sync_mux.cc index 4d17fcaf7..526599aed 100644 --- a/gr-atsc/src/lib/atsc_field_sync_mux.cc +++ b/gr-atsc/src/lib/atsc_field_sync_mux.cc @@ -162,7 +162,7 @@ atsc_field_sync_mux::work (int noutput_items, atsc_data_segment *out = (atsc_data_segment *) output_items[0]; unsigned int index = 0; - for (unsigned int outdex = 0; outdex < noutput_items; outdex++){ + for (int outdex = 0; outdex < noutput_items; outdex++){ assert (in[index].pli.regular_seg_p ()); diff --git a/gr-atsc/src/lib/atsc_pad.cc b/gr-atsc/src/lib/atsc_pad.cc index 17f50e1f8..cd1353e26 100644 --- a/gr-atsc/src/lib/atsc_pad.cc +++ b/gr-atsc/src/lib/atsc_pad.cc @@ -61,10 +61,8 @@ atsc_pad::work (int noutput_items, { const unsigned char *in = (const unsigned char *) input_items[0]; atsc_mpeg_packet *out = (atsc_mpeg_packet *) output_items[0]; - - // size with padding (256) - unsigned int ATSC_MPEG_PKT = sizeof(atsc_mpeg_packet); - unsigned int i; + + int i; for (i = 0; i < noutput_items; i++){ for (int j = 0; j < ATSC_MPEG_PKT_LENGTH; j++) diff --git a/gr-atsc/src/lib/atsci_equalizer_lms.cc b/gr-atsc/src/lib/atsci_equalizer_lms.cc index 723a5d37d..6358b5334 100644 --- a/gr-atsc/src/lib/atsci_equalizer_lms.cc +++ b/gr-atsc/src/lib/atsci_equalizer_lms.cc @@ -37,7 +37,7 @@ static const int NPRETAPS = (int) (NTAPS * 0.8); // probably should be either .2 // the length of the field sync pattern that we know unequivocally static const int KNOWN_FIELD_SYNC_LENGTH = 4 + 511 + 3 * 63; -static const float *get_data_seg_sync_training_sequence (int offset); +// static const float *get_data_seg_sync_training_sequence (int offset); static int get_field_sync_training_sequence_length (int offset); static const float *get_field_sync_training_sequence (int which_field, int offset); @@ -272,13 +272,14 @@ init_field_sync_common (float *p, int mask) assert (i == KNOWN_FIELD_SYNC_LENGTH); } - +#if 0 static const float * get_data_seg_sync_training_sequence (int offset) { static const float training_data[4] = { +5, -5, -5, +5 }; return &training_data[offset]; } +#endif static int get_field_sync_training_sequence_length (int offset) diff --git a/gr-atsc/src/lib/atsci_equalizer_lms2.cc b/gr-atsc/src/lib/atsci_equalizer_lms2.cc index b8124fa92..345f6209f 100644 --- a/gr-atsc/src/lib/atsci_equalizer_lms2.cc +++ b/gr-atsc/src/lib/atsci_equalizer_lms2.cc @@ -38,7 +38,7 @@ static const int NFBTAPS = 192; // the length of the field sync pattern that we know unequivocally static const int KNOWN_FIELD_SYNC_LENGTH = 4 + 511 + 3 * 63; -static const float *get_data_seg_sync_training_sequence (int offset); +// static const float *get_data_seg_sync_training_sequence (int offset); static int get_field_sync_training_sequence_length (int offset); static const float *get_field_sync_training_sequence (int which_field, int offset); @@ -339,13 +339,14 @@ init_field_sync_common (float *p, int mask) assert (i == KNOWN_FIELD_SYNC_LENGTH); } - +#if 0 static const float * get_data_seg_sync_training_sequence (int offset) { static const float training_data[4] = { +5, -5, -5, +5 }; return &training_data[offset]; } +#endif static int get_field_sync_training_sequence_length (int offset) diff --git a/gr-audio-alsa/src/Makefile.am b/gr-audio-alsa/src/Makefile.am index 2b73c7b11..742af80b5 100644 --- a/gr-audio-alsa/src/Makefile.am +++ b/gr-audio-alsa/src/Makefile.am @@ -90,6 +90,8 @@ _audio_alsa_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version libgr_audio_alsa_la_LDFLAGS = $(NO_UNDEFINED) +_audio_alsa_la_CXXFLAGS = @swig_CXXFLAGS@ + audio_alsa.cc audio_alsa.py: $(LOCAL_IFILES) $(NON_LOCAL_IFILES) $(SWIG) $(SWIGPYTHONARGS) -module audio_alsa -o audio_alsa.cc $(LOCAL_IFILES) diff --git a/gr-audio-alsa/src/audio_alsa_sink.cc b/gr-audio-alsa/src/audio_alsa_sink.cc index ef51f7553..fe3f043bf 100644 --- a/gr-audio-alsa/src/audio_alsa_sink.cc +++ b/gr-audio-alsa/src/audio_alsa_sink.cc @@ -138,7 +138,8 @@ audio_alsa_sink::audio_alsa_sink (int sampling_rate, // Specify the access methods we implement // For now, we only handle RW_INTERLEAVED... snd_pcm_access_mask_t *access_mask; - snd_pcm_access_mask_alloca (&access_mask); + snd_pcm_access_mask_t **access_mask_ptr = &access_mask; // FIXME: workaround for compiler warning + snd_pcm_access_mask_alloca (access_mask_ptr); snd_pcm_access_mask_none (access_mask); snd_pcm_access_mask_set (access_mask, SND_PCM_ACCESS_RW_INTERLEAVED); // snd_pcm_access_mask_set (access_mask, SND_PCM_ACCESS_RW_NONINTERLEAVED); diff --git a/gr-audio-alsa/src/audio_alsa_source.cc b/gr-audio-alsa/src/audio_alsa_source.cc index c467b8f85..381e553f5 100644 --- a/gr-audio-alsa/src/audio_alsa_source.cc +++ b/gr-audio-alsa/src/audio_alsa_source.cc @@ -138,7 +138,8 @@ audio_alsa_source::audio_alsa_source (int sampling_rate, // Specify the access methods we implement // For now, we only handle RW_INTERLEAVED... snd_pcm_access_mask_t *access_mask; - snd_pcm_access_mask_alloca (&access_mask); + snd_pcm_access_mask_t **access_mask_ptr = &access_mask; // FIXME: workaround for compiler warning + snd_pcm_access_mask_alloca (access_mask_ptr); snd_pcm_access_mask_none (access_mask); snd_pcm_access_mask_set (access_mask, SND_PCM_ACCESS_RW_INTERLEAVED); // snd_pcm_access_mask_set (access_mask, SND_PCM_ACCESS_RW_NONINTERLEAVED); diff --git a/gr-audio-jack/src/Makefile.am b/gr-audio-jack/src/Makefile.am index 199382f52..974dad7b5 100644 --- a/gr-audio-jack/src/Makefile.am +++ b/gr-audio-jack/src/Makefile.am @@ -80,6 +80,8 @@ _audio_jack_la_LIBADD = \ _audio_jack_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version +_audio_jack_la_CXXFLAGS = @swig_CXXFLAGS@ + audio_jack.cc audio_jack.py: $(LOCAL_IFILES) $(NON_LOCAL_IFILES) $(SWIG) $(SWIGPYTHONARGS) -module audio_jack -o audio_jack.cc $(LOCAL_IFILES) diff --git a/gr-audio-oss/src/Makefile.am b/gr-audio-oss/src/Makefile.am index 621aae168..abb08e39a 100644 --- a/gr-audio-oss/src/Makefile.am +++ b/gr-audio-oss/src/Makefile.am @@ -75,6 +75,8 @@ _audio_oss_la_LIBADD = \ _audio_oss_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version +_audio_oss_la_CXXFLAGS = @swig_CXXFLAGS@ + audio_oss.cc audio_oss.py: $(LOCAL_IFILES) $(NON_LOCAL_IFILES) $(SWIG) $(SWIGPYTHONARGS) -module audio_oss -o audio_oss.cc $(LOCAL_IFILES) diff --git a/gr-audio-osx/src/Makefile.am b/gr-audio-osx/src/Makefile.am index 6bfbaa4e6..f69529657 100644 --- a/gr-audio-osx/src/Makefile.am +++ b/gr-audio-osx/src/Makefile.am @@ -79,6 +79,8 @@ _audio_osx_la_LIBADD = \ _audio_osx_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version -framework AudioUnit -framework CoreAudio -framework AudioToolbox +_audio_osx_la_CXXFLAGS = @swig_CXXFLAGS@ + audio_osx.cc audio_osx.py: $(ALL_IFILES) $(SWIG) $(SWIGCPPPYTHONARGS) -module audio_osx -o audio_osx.cc $(LOCAL_IFILES) diff --git a/gr-audio-portaudio/src/Makefile.am b/gr-audio-portaudio/src/Makefile.am index fc00b7e26..f0bd3b196 100644 --- a/gr-audio-portaudio/src/Makefile.am +++ b/gr-audio-portaudio/src/Makefile.am @@ -81,6 +81,8 @@ _audio_portaudio_la_LIBADD = \ _audio_portaudio_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version +_audio_portaudio_la_CXXFLAGS = @swig_CXXFLAGS@ + audio_portaudio.cc audio_portaudio.py: $(ALL_IFILES) audio_portaudio_sink.h audio_portaudio_source.h $(SWIG) $(SWIGPYTHONARGS) -module audio_portaudio -o audio_portaudio.cc $(LOCAL_IFILES) diff --git a/gr-audio-windows/src/Makefile.am b/gr-audio-windows/src/Makefile.am index 3dc30da17..2f5c26c6a 100644 --- a/gr-audio-windows/src/Makefile.am +++ b/gr-audio-windows/src/Makefile.am @@ -77,6 +77,8 @@ _audio_windows_la_LIBADD = \ _audio_windows_la_LDFLAGS = -no-undefined -module -avoid-version \ $(LIBGNURADIO_CORE_EXTRA_LDFLAGS) +_audio_windows_la_CXXFLAGS = @swig_CXXFLAGS@ + audio_windows.cc audio_windows.py: $(LOCAL_IFILES) $(SWIG) $(SWIGCPPPYTHONARGS) -module audio_windows -o audio_windows.cc $(LOCAL_IFILES) diff --git a/gr-comedi/src/Makefile.am b/gr-comedi/src/Makefile.am index 00e14c77c..6fc028998 100644 --- a/gr-comedi/src/Makefile.am +++ b/gr-comedi/src/Makefile.am @@ -82,6 +82,8 @@ _comedi_la_LIBADD = \ _comedi_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version +_comedi_la_CXXFLAGS = @swig_CXXFLAGS@ + comedi.cc comedi.py: $(LOCAL_IFILES) $(SWIG) $(SWIGCPPPYTHONARGS) -module comedi -o comedi.cc $(LOCAL_IFILES) diff --git a/gr-cvsd-vocoder/src/lib/Makefile.am b/gr-cvsd-vocoder/src/lib/Makefile.am index 402a10eed..c4f1fac39 100644 --- a/gr-cvsd-vocoder/src/lib/Makefile.am +++ b/gr-cvsd-vocoder/src/lib/Makefile.am @@ -73,6 +73,8 @@ _cvsd_vocoder_la_LIBADD = \ $(GNURADIO_CORE_LA) \ -lstdc++ +_cvsd_vocoder_la_CXXFLAGS = @swig_CXXFLAGS@ + cvsd_vocoder.cc cvsd_vocoder.py: cvsd_vocoder.i $(ALL_IFILES) $(SWIG) $(SWIGPYTHONARGS) -module cvsd_vocoder -o cvsd_vocoder.cc $(LOCAL_IFILES) diff --git a/gr-cvsd-vocoder/src/lib/cvsd_decode_bs.cc b/gr-cvsd-vocoder/src/lib/cvsd_decode_bs.cc index 6b44c57e5..1dad15d43 100644 --- a/gr-cvsd-vocoder/src/lib/cvsd_decode_bs.cc +++ b/gr-cvsd-vocoder/src/lib/cvsd_decode_bs.cc @@ -64,12 +64,8 @@ cvsd_decode_bs::cvsd_decode_bs (short min_step, short max_step, double step_deca d_stepsize(min_step) { - assert(d_pos_accum_max <= SHRT_MAX); - assert(d_neg_accum_max >= -SHRT_MAX); assert(d_K <= 32); assert(d_J <= d_K); - - // nothing else required in this example } diff --git a/gr-cvsd-vocoder/src/lib/cvsd_encode_sb.cc b/gr-cvsd-vocoder/src/lib/cvsd_encode_sb.cc index c2d13d19b..561b91c68 100644 --- a/gr-cvsd-vocoder/src/lib/cvsd_encode_sb.cc +++ b/gr-cvsd-vocoder/src/lib/cvsd_encode_sb.cc @@ -63,12 +63,8 @@ cvsd_encode_sb::cvsd_encode_sb (short min_step, short max_step, double step_deca d_stepsize(min_step) { - assert(d_pos_accum_max <= SHRT_MAX); - assert(d_neg_accum_max >= -SHRT_MAX); assert(d_K <= 32); assert(d_J <= d_K); - - // nothing else required in this example } diff --git a/gr-gcell/src/Makefile.am b/gr-gcell/src/Makefile.am index fa9298913..36b618f4b 100644 --- a/gr-gcell/src/Makefile.am +++ b/gr-gcell/src/Makefile.am @@ -93,6 +93,7 @@ _gcell_la_LIBADD = \ _gcell_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version +_gcell_la_CXXFLAGS = @swig_CXXFLAGS@ swiginclude_HEADERS = \ $(LOCAL_IFILES) diff --git a/gr-trellis/src/lib/Makefile.am b/gr-trellis/src/lib/Makefile.am index f2f81286f..1620d69ff 100644 --- a/gr-trellis/src/lib/Makefile.am +++ b/gr-trellis/src/lib/Makefile.am @@ -143,6 +143,8 @@ _trellis_la_LIBADD = \ $(GNURADIO_CORE_LA) \ -lstdc++ +_trellis_la_CXXFLAGS = @swig_CXXFLAGS@ + trellis.cc trellis.py: $(ALL_IFILES) $(grinclude_HEADERS) $(SWIG) $(SWIGPYTHONARGS) -module trellis -o trellis.cc $(LOCAL_IFILES) diff --git a/gr-usrp/src/Makefile.am b/gr-usrp/src/Makefile.am index 4bb40800f..03ca34db0 100644 --- a/gr-usrp/src/Makefile.am +++ b/gr-usrp/src/Makefile.am @@ -108,6 +108,7 @@ _usrp1_la_LIBADD = \ _usrp1_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version +_usrp1_la_CXXFLAGS = @swig_CXXFLAGS@ usrp1.cc usrp1.py: usrp1.i $(NON_LOCAL_IFILES) $(LOCAL_IFILES) $(SWIG) $(SWIGPYTHONARGS) -module usrp1 -o usrp1.cc $(LOCAL_IFILES) diff --git a/usrp/host/apps/usrper.cc b/usrp/host/apps/usrper.cc index 620287d46..3740022e0 100644 --- a/usrp/host/apps/usrper.cc +++ b/usrp/host/apps/usrper.cc @@ -71,12 +71,14 @@ usage () exit (1); } +#if 0 static void die (const char *msg) { fprintf (stderr, "%s (die): %s\n", prog_name, msg); exit (1); } +#endif static int hexval (char ch) diff --git a/usrp/host/lib/legacy/std_paths.h.in b/usrp/host/lib/legacy/std_paths.h.in index 9c26cfa23..e09499e0b 100644 --- a/usrp/host/lib/legacy/std_paths.h.in +++ b/usrp/host/lib/legacy/std_paths.h.in @@ -20,7 +20,7 @@ * Boston, MA 02110-1301, USA. */ -static char *std_paths[] = { +static const char *std_paths[] = { "@prefix@/share/usrp", "/usr/local/share/usrp", 0 diff --git a/usrp/host/lib/legacy/usrp_prims.cc b/usrp/host/lib/legacy/usrp_prims.cc index 0034bb31e..c2f74f5f1 100644 --- a/usrp/host/lib/legacy/usrp_prims.cc +++ b/usrp/host/lib/legacy/usrp_prims.cc @@ -58,8 +58,8 @@ static const int hash_slot_addr[2] = { USRP_HASH_SLOT_1_ADDR }; -static char *default_firmware_filename = "std.ihx"; -static char *default_fpga_filename = "std_2rxhb_2tx.rbf"; +static const char *default_firmware_filename = "std.ihx"; +static const char *default_fpga_filename = "std_2rxhb_2tx.rbf"; #include "std_paths.h" #include <stdio.h> @@ -67,7 +67,7 @@ static char *default_fpga_filename = "std_2rxhb_2tx.rbf"; static char * find_file (const char *filename, int hw_rev) { - char **sp = std_paths; + const char **sp = std_paths; static char path[1000]; char *s; diff --git a/usrp/host/swig/Makefile.am b/usrp/host/swig/Makefile.am index dc92f2b48..57bc3bdc8 100644 --- a/usrp/host/swig/Makefile.am +++ b/usrp/host/swig/Makefile.am @@ -69,6 +69,7 @@ noinst_HEADERS = _usrp_prims_la_LIBADD = $(USRP_LA) -lstdc++ $(PYTHON_LDFLAGS) _usrp_prims_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version +_usrp_prims_la_CXXFLAGS = @swig_CXXFLAGS@ prims.cc usrp_prims.py : prims.i ../../firmware/include/fpga_regs_common.h ../../firmware/include/fpga_regs_standard.h $(SWIG) $(SWIGPYTHONARGS) -module usrp_prims -o prims.cc prims.i |