Commit 5be8e1f258f67205555a79af20813d68ac5878e0
1 parent
40ea94a5
Silence warnings about unused variables
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5535 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
5 additions
and
5 deletions
usb-linux.c
@@ -76,6 +76,8 @@ static int usb_host_find_device(int *pbus_num, int *paddr, | @@ -76,6 +76,8 @@ static int usb_host_find_device(int *pbus_num, int *paddr, | ||
76 | #define dprintf(...) | 76 | #define dprintf(...) |
77 | #endif | 77 | #endif |
78 | 78 | ||
79 | +#define USBDBG_DEVOPENED "husb: opened %s/devices\n" | ||
80 | + | ||
79 | #define USBPROCBUS_PATH "/proc/bus/usb" | 81 | #define USBPROCBUS_PATH "/proc/bus/usb" |
80 | #define PRODUCT_NAME_SZ 32 | 82 | #define PRODUCT_NAME_SZ 32 |
81 | #define MAX_ENDPOINTS 16 | 83 | #define MAX_ENDPOINTS 16 |
@@ -1262,8 +1264,6 @@ static int usb_host_scan(void *opaque, USBScanFunc *func) | @@ -1262,8 +1264,6 @@ static int usb_host_scan(void *opaque, USBScanFunc *func) | ||
1262 | FILE *f = 0; | 1264 | FILE *f = 0; |
1263 | DIR *dir = 0; | 1265 | DIR *dir = 0; |
1264 | int ret = 0; | 1266 | int ret = 0; |
1265 | - const char *devices = "/devices"; | ||
1266 | - const char *opened = "husb: opened %s%s\n"; | ||
1267 | const char *fs_type[] = {"unknown", "proc", "dev", "sys"}; | 1267 | const char *fs_type[] = {"unknown", "proc", "dev", "sys"}; |
1268 | char devpath[PATH_MAX]; | 1268 | char devpath[PATH_MAX]; |
1269 | 1269 | ||
@@ -1275,7 +1275,7 @@ static int usb_host_scan(void *opaque, USBScanFunc *func) | @@ -1275,7 +1275,7 @@ static int usb_host_scan(void *opaque, USBScanFunc *func) | ||
1275 | strcpy(devpath, USBPROCBUS_PATH); | 1275 | strcpy(devpath, USBPROCBUS_PATH); |
1276 | usb_fs_type = USB_FS_PROC; | 1276 | usb_fs_type = USB_FS_PROC; |
1277 | fclose(f); | 1277 | fclose(f); |
1278 | - dprintf(opened, USBPROCBUS_PATH, devices); | 1278 | + dprintf(USBDBG_DEVOPENED, USBPROCBUS_PATH); |
1279 | goto found_devices; | 1279 | goto found_devices; |
1280 | } | 1280 | } |
1281 | /* try additional methods if an access method hasn't been found yet */ | 1281 | /* try additional methods if an access method hasn't been found yet */ |
@@ -1285,7 +1285,7 @@ static int usb_host_scan(void *opaque, USBScanFunc *func) | @@ -1285,7 +1285,7 @@ static int usb_host_scan(void *opaque, USBScanFunc *func) | ||
1285 | strcpy(devpath, USBDEVBUS_PATH); | 1285 | strcpy(devpath, USBDEVBUS_PATH); |
1286 | usb_fs_type = USB_FS_DEV; | 1286 | usb_fs_type = USB_FS_DEV; |
1287 | fclose(f); | 1287 | fclose(f); |
1288 | - dprintf(opened, USBDEVBUS_PATH, devices); | 1288 | + dprintf(USBDBG_DEVOPENED, USBDEVBUS_PATH); |
1289 | goto found_devices; | 1289 | goto found_devices; |
1290 | } | 1290 | } |
1291 | dir = opendir(USBSYSBUS_PATH "/devices"); | 1291 | dir = opendir(USBSYSBUS_PATH "/devices"); |
@@ -1294,7 +1294,7 @@ static int usb_host_scan(void *opaque, USBScanFunc *func) | @@ -1294,7 +1294,7 @@ static int usb_host_scan(void *opaque, USBScanFunc *func) | ||
1294 | strcpy(devpath, USBDEVBUS_PATH); | 1294 | strcpy(devpath, USBDEVBUS_PATH); |
1295 | usb_fs_type = USB_FS_SYS; | 1295 | usb_fs_type = USB_FS_SYS; |
1296 | closedir(dir); | 1296 | closedir(dir); |
1297 | - dprintf(opened, USBSYSBUS_PATH, devices); | 1297 | + dprintf(USBDBG_DEVOPENED, USBSYSBUS_PATH); |
1298 | goto found_devices; | 1298 | goto found_devices; |
1299 | } | 1299 | } |
1300 | found_devices: | 1300 | found_devices: |