From e4c4e9c9567e669b78b145975daa0c1ad00182ca Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 9 Jul 2011 19:30:40 -0700 Subject: core: added missing config.h includes on cc files Added to the cc files which were missing config.h and required compatibility functions defined in config.h. Applies to compiling under MSVC with cmake work branch. --- gnuradio-core/src/lib/filter/gri_goertzel.cc | 3 +++ gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator.cc | 4 ++++ gnuradio-core/src/lib/general/gr_firdes.cc | 4 ++++ gnuradio-core/src/lib/general/gr_random.cc | 3 +++ gnuradio-core/src/lib/general/gri_float_to_char.cc | 4 ++++ gnuradio-core/src/lib/general/gri_float_to_short.cc | 4 ++++ gnuradio-core/src/lib/general/gri_float_to_uchar.cc | 4 ++++ gnuradio-core/src/lib/io/microtune_xxxx_eval_board.cc | 4 ++++ 8 files changed, 30 insertions(+) (limited to 'gnuradio-core') diff --git a/gnuradio-core/src/lib/filter/gri_goertzel.cc b/gnuradio-core/src/lib/filter/gri_goertzel.cc index 85e66c069..73b8366ab 100644 --- a/gnuradio-core/src/lib/filter/gri_goertzel.cc +++ b/gnuradio-core/src/lib/filter/gri_goertzel.cc @@ -20,6 +20,9 @@ * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator.cc b/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator.cc index 63654a280..d158ff00d 100644 --- a/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator.cc +++ b/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator.cc @@ -20,6 +20,10 @@ * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/gnuradio-core/src/lib/general/gr_firdes.cc b/gnuradio-core/src/lib/general/gr_firdes.cc index 5d192d67e..13110d57d 100644 --- a/gnuradio-core/src/lib/general/gr_firdes.cc +++ b/gnuradio-core/src/lib/general/gr_firdes.cc @@ -20,6 +20,10 @@ * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include diff --git a/gnuradio-core/src/lib/general/gr_random.cc b/gnuradio-core/src/lib/general/gr_random.cc index 67f760006..52140acc2 100644 --- a/gnuradio-core/src/lib/general/gr_random.cc +++ b/gnuradio-core/src/lib/general/gr_random.cc @@ -35,6 +35,9 @@ * */ +#ifdef HAVE_CONFIG_H +#include +#endif #include #include diff --git a/gnuradio-core/src/lib/general/gri_float_to_char.cc b/gnuradio-core/src/lib/general/gri_float_to_char.cc index a17b01f55..28f15a3b3 100644 --- a/gnuradio-core/src/lib/general/gri_float_to_char.cc +++ b/gnuradio-core/src/lib/general/gri_float_to_char.cc @@ -20,6 +20,10 @@ * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #define _ISOC9X_SOURCE #include #include diff --git a/gnuradio-core/src/lib/general/gri_float_to_short.cc b/gnuradio-core/src/lib/general/gri_float_to_short.cc index 13afc51d9..93a2784f5 100644 --- a/gnuradio-core/src/lib/general/gri_float_to_short.cc +++ b/gnuradio-core/src/lib/general/gri_float_to_short.cc @@ -20,6 +20,10 @@ * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #define _ISOC9X_SOURCE #include #include diff --git a/gnuradio-core/src/lib/general/gri_float_to_uchar.cc b/gnuradio-core/src/lib/general/gri_float_to_uchar.cc index 394cbc100..a022c95d8 100644 --- a/gnuradio-core/src/lib/general/gri_float_to_uchar.cc +++ b/gnuradio-core/src/lib/general/gri_float_to_uchar.cc @@ -20,6 +20,10 @@ * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #define _ISOC9X_SOURCE #include #include diff --git a/gnuradio-core/src/lib/io/microtune_xxxx_eval_board.cc b/gnuradio-core/src/lib/io/microtune_xxxx_eval_board.cc index 668f04cad..14f2b8589 100644 --- a/gnuradio-core/src/lib/io/microtune_xxxx_eval_board.cc +++ b/gnuradio-core/src/lib/io/microtune_xxxx_eval_board.cc @@ -20,6 +20,10 @@ * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include "microtune_xxxx_eval_board.h" #include "microtune_eval_board_defs.h" #include "microtune_xxxx.h" -- cgit From 12719c3632c5c09e759aa9ad9baaa95f672cee46 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 9 Jul 2011 19:39:30 -0700 Subject: core: added missing io.h includes on cc files Added to the cc files which were missing io.h and required compatibility declarations in io.h to compile. Applies to compiling under MSVC with cmake work branch. --- gnuradio-core/src/lib/general/gr_circular_file.cc | 4 ++++ gnuradio-core/src/lib/io/gr_file_descriptor_sink.cc | 3 +++ gnuradio-core/src/lib/io/gr_file_descriptor_source.cc | 3 +++ gnuradio-core/src/lib/io/gr_tagged_file_sink.cc | 4 ++++ 4 files changed, 14 insertions(+) (limited to 'gnuradio-core') diff --git a/gnuradio-core/src/lib/general/gr_circular_file.cc b/gnuradio-core/src/lib/general/gr_circular_file.cc index c9222597a..4d88b9d99 100644 --- a/gnuradio-core/src/lib/general/gr_circular_file.cc +++ b/gnuradio-core/src/lib/general/gr_circular_file.cc @@ -42,6 +42,10 @@ #include #include +#ifdef HAVE_IO_H +#include +#endif + static const int HEADER_SIZE = 4096; static const int HEADER_MAGIC = 0xEB021026; diff --git a/gnuradio-core/src/lib/io/gr_file_descriptor_sink.cc b/gnuradio-core/src/lib/io/gr_file_descriptor_sink.cc index 09fb6c826..11e0a8eb9 100644 --- a/gnuradio-core/src/lib/io/gr_file_descriptor_sink.cc +++ b/gnuradio-core/src/lib/io/gr_file_descriptor_sink.cc @@ -34,6 +34,9 @@ #include #include +#ifdef HAVE_IO_H +#include +#endif gr_file_descriptor_sink::gr_file_descriptor_sink (size_t itemsize, int fd) : gr_sync_block ("file_descriptor_sink", diff --git a/gnuradio-core/src/lib/io/gr_file_descriptor_source.cc b/gnuradio-core/src/lib/io/gr_file_descriptor_source.cc index 700ad4aef..334a57848 100644 --- a/gnuradio-core/src/lib/io/gr_file_descriptor_source.cc +++ b/gnuradio-core/src/lib/io/gr_file_descriptor_source.cc @@ -35,6 +35,9 @@ #include #include +#ifdef HAVE_IO_H +#include +#endif gr_file_descriptor_source::gr_file_descriptor_source (size_t itemsize, int fd, diff --git a/gnuradio-core/src/lib/io/gr_tagged_file_sink.cc b/gnuradio-core/src/lib/io/gr_tagged_file_sink.cc index 154611c32..91618bad6 100644 --- a/gnuradio-core/src/lib/io/gr_tagged_file_sink.cc +++ b/gnuradio-core/src/lib/io/gr_tagged_file_sink.cc @@ -34,6 +34,10 @@ #include #include +#ifdef HAVE_IO_H +#include +#endif + #ifdef O_BINARY #define OUR_O_BINARY O_BINARY #else -- cgit From b623dff43ad12b7539184950074ba5b0ecbf34fb Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Tue, 26 Jul 2011 21:59:27 -0400 Subject: Fixed return warnings. --- gnuradio-core/src/lib/io/gri_wavfile.cc | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'gnuradio-core') diff --git a/gnuradio-core/src/lib/io/gri_wavfile.cc b/gnuradio-core/src/lib/io/gri_wavfile.cc index b8375edc2..8f1c6a2bb 100644 --- a/gnuradio-core/src/lib/io/gri_wavfile.cc +++ b/gnuradio-core/src/lib/io/gri_wavfile.cc @@ -160,25 +160,25 @@ gri_wavheader_parse(FILE *fp, return false; } - fread(&file_size, 1, 4, fp); + fresult = fread(&file_size, 1, 4, fp); fresult = fread(str_buf, 1, 8, fp); if (fresult != 8 || strncmp(str_buf, "WAVEfmt ", 8) || feof(fp)) { return false; } - fread(&fmt_hdr_skip, 1, 4, fp); + fresult = fread(&fmt_hdr_skip, 1, 4, fp); - fread(&compression_type, 1, 2, fp); + fresult = fread(&compression_type, 1, 2, fp); if (wav_to_host(compression_type) != VALID_COMPRESSION_TYPE) { return false; } - fread(&nchans, 1, 2, fp); - fread(&sample_rate, 1, 4, fp); - fread(&avg_bytes_per_sec, 1, 4, fp); - fread(&block_align, 1, 2, fp); - fread(&bits_per_sample, 1, 2, fp); + fresult = fread(&nchans, 1, 2, fp); + fresult = fread(&sample_rate, 1, 4, fp); + fresult = fread(&avg_bytes_per_sec, 1, 4, fp); + fresult = fread(&block_align, 1, 2, fp); + fresult = fread(&bits_per_sample, 1, 2, fp); if (ferror(fp)) { return false; @@ -204,7 +204,7 @@ gri_wavheader_parse(FILE *fp, return false; } - fread(&chunk_size, 1, 4, fp); + fresult = fread(&chunk_size, 1, 4, fp); if (ferror(fp)) { return false; } @@ -226,7 +226,9 @@ short int gri_wav_read_sample(FILE *fp, int bytes_per_sample) { int16_t buf = 0; - fread(&buf, bytes_per_sample, 1, fp); + size_t fresult; + + fresult = fread(&buf, bytes_per_sample, 1, fp); return (short) wav_to_host(buf); } -- cgit From f6318ef04d03be8f2e039d4fa71eba9105758783 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Tue, 26 Jul 2011 22:00:18 -0400 Subject: Fixed warnings about doxygen format. --- gnuradio-core/src/lib/filter/gr_dc_blocker_cc.h | 1 - gnuradio-core/src/lib/filter/gr_dc_blocker_ff.h | 1 - 2 files changed, 2 deletions(-) (limited to 'gnuradio-core') diff --git a/gnuradio-core/src/lib/filter/gr_dc_blocker_cc.h b/gnuradio-core/src/lib/filter/gr_dc_blocker_cc.h index de9ccc0ea..d299cc7ef 100644 --- a/gnuradio-core/src/lib/filter/gr_dc_blocker_cc.h +++ b/gnuradio-core/src/lib/filter/gr_dc_blocker_cc.h @@ -79,7 +79,6 @@ class gr_dc_blocker_cc : public gr_sync_block * Build the DC blocker. * \param D (int) the length of the delay line * \param long_form (bool) whether to use long (true, default) or short form - * \param channel (unsigned integer) Selects the channel to return [default=0]. */ friend gr_dc_blocker_cc_sptr gr_make_dc_blocker_cc (int D, bool long_form); diff --git a/gnuradio-core/src/lib/filter/gr_dc_blocker_ff.h b/gnuradio-core/src/lib/filter/gr_dc_blocker_ff.h index b632d81da..8ffb6cf6f 100644 --- a/gnuradio-core/src/lib/filter/gr_dc_blocker_ff.h +++ b/gnuradio-core/src/lib/filter/gr_dc_blocker_ff.h @@ -79,7 +79,6 @@ class gr_dc_blocker_ff : public gr_sync_block * Build the DC blocker. * \param D (int) the length of the delay line * \param long_form (bool) whether to use long (true, default) or short form - * \param channel (unsigned integer) Selects the channel to return [default=0]. */ friend gr_dc_blocker_ff_sptr gr_make_dc_blocker_ff (int D, bool long_form); -- cgit