diff options
author | jcorgan | 2008-08-24 17:41:07 +0000 |
---|---|---|
committer | jcorgan | 2008-08-24 17:41:07 +0000 |
commit | 34af4364456b9005efee3c3986ea0f4dce87c99e (patch) | |
tree | 06dc2b36e42a00985364f043748f9ab1881bde0b /gnuradio-core/src | |
parent | 66a225bf721cd61c736879bdf8ab44674319426d (diff) | |
download | gnuradio-34af4364456b9005efee3c3986ea0f4dce87c99e.tar.gz gnuradio-34af4364456b9005efee3c3986ea0f4dce87c99e.tar.bz2 gnuradio-34af4364456b9005efee3c3986ea0f4dce87c99e.zip |
Fix compiler warnings across the tree. Adds --enable-warnings-as-errors configure option. Currently compiles with no warnings with GCC 4.2.3 on Ubuntu 8.04.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9396 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-core/src')
-rw-r--r-- | gnuradio-core/src/lib/bug_work_around_6.cc | 2 | ||||
-rw-r--r-- | gnuradio-core/src/lib/filter/gr_adaptive_fir_ccf.cc | 2 | ||||
-rw-r--r-- | gnuradio-core/src/lib/filter/gr_adaptive_fir_ccf.h | 2 | ||||
-rw-r--r-- | gnuradio-core/src/lib/filter/gr_fft_filter_ccc.cc | 2 | ||||
-rw-r--r-- | gnuradio-core/src/lib/filter/gr_fft_filter_fff.cc | 2 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_iqcomp_cc.cc | 5 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_ofdm_qam_mapper.cc | 4 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_stream_mux.cc | 2 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gri_fft.cc | 2 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/qa_gr_firdes.cc | 2 | ||||
-rw-r--r-- | gnuradio-core/src/lib/missing/bug_work_around_8.cc | 2 |
11 files changed, 18 insertions, 9 deletions
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)); |