made some globals static to fix warnings
authorSean McBride <sean@rogue-research.com>
Fri, 26 Jul 2013 18:13:45 +0000 (14:13 -0400)
committerhjelmn <Nathan Hjelm hjelmn@cs.unm.edu>
Tue, 30 Jul 2013 16:44:13 +0000 (10:44 -0600)
examples/ezusb.c
examples/xusb.c
libusb/core.c
libusb/version_nano.h

index 931a86af596114e7aca1854198827d390d787e6b..7505fa0a4bb85c7168d0d198b895042ed7dfa82b 100644 (file)
@@ -471,9 +471,9 @@ static int parse_iic(FILE *image, void *context,
 }
 
 /* the parse call will be selected according to the image type */
-int (*parse[IMG_TYPE_MAX])(FILE *image, void *context, bool (*is_external)(uint32_t addr, size_t len),
-       int (*poke)(void *context, uint32_t addr, bool external, const unsigned char *data, size_t len))
-       = { parse_ihex, parse_iic, parse_bin };
+static int (*parse[IMG_TYPE_MAX])(FILE *image, void *context, bool (*is_external)(uint32_t addr, size_t len),
+           int (*poke)(void *context, uint32_t addr, bool external, const unsigned char *data, size_t len))
+           = { parse_ihex, parse_iic, parse_bin };
 
 /*****************************************************************************/
 
index bdb97949f56bc85fa94208172167dbdb42455d69..4df65c489d7af7fb24add8db19ef5f8156c97228 100644 (file)
@@ -48,9 +48,9 @@
 #define usb_interface interface
 
 // Global variables
-bool binary_dump = false;
-bool extra_info = false;
-const char* binary_name = NULL;
+static bool binary_dump = false;
+static bool extra_info = false;
+static const char* binary_name = NULL;
 
 static int perr(char const *format, ...)
 {
@@ -128,14 +128,14 @@ static uint8_t cdb_length[256] = {
        00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,  //  F
 };
 
-enum test_type {
+static enum test_type {
        USE_GENERIC,
        USE_PS3,
        USE_XBOX,
        USE_SCSI,
        USE_HID,
 } test_mode;
-uint16_t VID, PID;
+static uint16_t VID, PID;
 
 static void display_buffer_hex(unsigned char *buffer, unsigned size)
 {
index e29e8df254bbcf2b683ca7fb7ad1a404c7e79ffe..4f2f366a923eb1d0aec23bb6f39b6bcf4b98f3c1 100644 (file)
@@ -56,7 +56,7 @@ const struct usbi_os_backend * const usbi_backend = &wince_backend;
 #endif
 
 struct libusb_context *usbi_default_context = NULL;
-const struct libusb_version libusb_version_internal =
+static const struct libusb_version libusb_version_internal =
        { LIBUSB_MAJOR, LIBUSB_MINOR, LIBUSB_MICRO, LIBUSB_NANO,
          LIBUSB_RC, "http://libusbx.org" };
 static int default_context_refcnt = 0;
index 65954285f57d60db5fdb517e8febde81b77d1ae3..ba07e8ffab6b300a3518759c9bf4af3c87acd331 100644 (file)
@@ -1 +1 @@
-#define LIBUSB_NANO 10794
+#define LIBUSB_NANO 10795