diff options
author | Johnathan Corgan | 2012-03-13 09:17:33 -0700 |
---|---|---|
committer | Johnathan Corgan | 2012-03-13 09:37:04 -0700 |
commit | a14aeb5f17035e767270c631a9c8d1059d7d5f16 (patch) | |
tree | be47496c70178cf2705c6066bece4c9c32ad3ce3 /gr-fcd | |
parent | 85beb37cac923798fa0ea6f27a3413e174e43367 (diff) | |
download | gnuradio-a14aeb5f17035e767270c631a9c8d1059d7d5f16.tar.gz gnuradio-a14aeb5f17035e767270c631a9c8d1059d7d5f16.tar.bz2 gnuradio-a14aeb5f17035e767270c631a9c8d1059d7d5f16.zip |
fcd: fix compiler and documentation warnings
* Mismatch in parameter name in hidapi.h
* Signedness error in hid-libusb.c
* Disable unusued warning for TODO items in fcd_source_c.cc
Diffstat (limited to 'gr-fcd')
-rw-r--r-- | gr-fcd/lib/fcd_source_c.cc | 9 | ||||
-rw-r--r-- | gr-fcd/lib/hid/hid-libusb.c | 2 | ||||
-rw-r--r-- | gr-fcd/lib/hid/hidapi.h | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/gr-fcd/lib/fcd_source_c.cc b/gr-fcd/lib/fcd_source_c.cc index 22db5c669..75bdd3162 100644 --- a/gr-fcd/lib/fcd_source_c.cc +++ b/gr-fcd/lib/fcd_source_c.cc @@ -28,6 +28,7 @@ #include <gr_io_signature.h> #include <gr_audio_source.h> #include <gr_float_to_complex.h> +#include <gruel/attributes.h> //#include <iostream> //using namespace std; @@ -78,7 +79,7 @@ fcd_source_c::~fcd_source_c () // Set frequency with Hz resolution void fcd_source_c::set_freq(int freq) { - FCD_MODE_ENUM fme; + FCD_MODE_ENUM __GR_ATTR_UNUSED fme; double f = (double)freq; /* valid range 50 MHz - 2.0 GHz */ @@ -96,7 +97,7 @@ void fcd_source_c::set_freq(int freq) // Set frequency with Hz resolution (type float) void fcd_source_c::set_freq(float freq) { - FCD_MODE_ENUM fme; + FCD_MODE_ENUM __GR_ATTR_UNUSED fme; double f = (double)freq; /* valid range 50 MHz - 2.0 GHz */ @@ -115,7 +116,7 @@ void fcd_source_c::set_freq(float freq) // Set frequency with kHz resolution. void fcd_source_c::set_freq_khz(int freq) { - FCD_MODE_ENUM fme; + FCD_MODE_ENUM __GR_ATTR_UNUSED fme; double f = freq*1000.0; /* valid range 50 MHz - 2.0 GHz */ @@ -134,7 +135,7 @@ void fcd_source_c::set_freq_khz(int freq) // Set LNA gain void fcd_source_c::set_lna_gain(float gain) { - FCD_MODE_ENUM fme; + FCD_MODE_ENUM __GR_ATTR_UNUSED fme; unsigned char g; /* convert to nearest discrete value */ diff --git a/gr-fcd/lib/hid/hid-libusb.c b/gr-fcd/lib/hid/hid-libusb.c index cf3172a84..7069f50d0 100644 --- a/gr-fcd/lib/hid/hid-libusb.c +++ b/gr-fcd/lib/hid/hid-libusb.c @@ -308,7 +308,7 @@ static int is_language_supported(libusb_device_handle *dev, uint16_t lang) static wchar_t *get_usb_string(libusb_device_handle *dev, uint8_t idx) { char buf[512]; - int len; + unsigned int len; wchar_t *str = NULL; wchar_t wbuf[256]; diff --git a/gr-fcd/lib/hid/hidapi.h b/gr-fcd/lib/hid/hidapi.h index 6c8c48396..31b1cf206 100644 --- a/gr-fcd/lib/hid/hidapi.h +++ b/gr-fcd/lib/hid/hidapi.h @@ -207,7 +207,7 @@ extern "C" { contain the Report number if the device uses numbered reports. @ingroup API - @param device A device handle returned from hid_open(). + @param dev A device handle returned from hid_open(). @param data A buffer to put the read data into. @param length The number of bytes to read. For devices with multiple reports, make sure to read an extra byte for |