From a14aeb5f17035e767270c631a9c8d1059d7d5f16 Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Tue, 13 Mar 2012 09:17:33 -0700 Subject: 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 --- gr-fcd/lib/fcd_source_c.cc | 9 +++++---- gr-fcd/lib/hid/hid-libusb.c | 2 +- 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 #include #include +#include //#include //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 -- cgit