[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] Unused function?

From: Sanjeev Gupta
Subject: [gpsd-dev] Unused function?
Date: Tue, 26 Aug 2014 15:22:11 +0800

In driver_garmin.c, at line 966, there is this code:

#if defined(__linux__) || defined(S_SPLINT_S)
     * Only perform this check if we're looking at a USB-serial
     * device.  This prevents drivers for attached serial GPSes
     * fronm being rudely elbowed aside by this one if they happen
     * to be trying to coexist with the Garmin.


        // FIXME!!! needs to use libusb totally and move garmin_gps aside */
        // set Mode 1, mode 0 is broken somewhere past 2.6.14
        // but how?
        gpsd_report(session->context->debug, LOG_PROG,
                    "Garmin: Set garmin_gps driver mode = 0\n");
        Build_Send_USB_Packet(session, GARMIN_LAYERID_PRIVATE,
                              PRIV_PKTID_SET_MODE, 4, MODE_GARMIN_SERIAL);
        // expect no return packet !?

        return true;
        return false;
#endif /* HAVE_LIBUSB */

At compile time, I see:

gcc -o driver_garmin.os -c -D_GNU_SOURCE -Wextra -Wall -Wno-uninitialized -Wno-missing-field-initializers -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -pthread -Wmissing-prototypes -Wmissing-declarations -O2 -fPIC driver_garmin.c
driver_garmin.c:736:13: warning: 'Build_Send_USB_Packet' defined but not used [-Wunused-function]
 static void Build_Send_USB_Packet(struct gps_device_t *session,

This is on an Ubuntu, 14.10 pre-release, and I have libusb-0.1-4  _and_ libusb-1.0-0 installed.

Sanjeev Gupta
+65 98551208

reply via email to

[Prev in Thread] Current Thread [Next in Thread]