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 | 76 | #define dprintf(...) |
77 | 77 | #endif |
78 | 78 | |
79 | +#define USBDBG_DEVOPENED "husb: opened %s/devices\n" | |
80 | + | |
79 | 81 | #define USBPROCBUS_PATH "/proc/bus/usb" |
80 | 82 | #define PRODUCT_NAME_SZ 32 |
81 | 83 | #define MAX_ENDPOINTS 16 |
... | ... | @@ -1262,8 +1264,6 @@ static int usb_host_scan(void *opaque, USBScanFunc *func) |
1262 | 1264 | FILE *f = 0; |
1263 | 1265 | DIR *dir = 0; |
1264 | 1266 | int ret = 0; |
1265 | - const char *devices = "/devices"; | |
1266 | - const char *opened = "husb: opened %s%s\n"; | |
1267 | 1267 | const char *fs_type[] = {"unknown", "proc", "dev", "sys"}; |
1268 | 1268 | char devpath[PATH_MAX]; |
1269 | 1269 | |
... | ... | @@ -1275,7 +1275,7 @@ static int usb_host_scan(void *opaque, USBScanFunc *func) |
1275 | 1275 | strcpy(devpath, USBPROCBUS_PATH); |
1276 | 1276 | usb_fs_type = USB_FS_PROC; |
1277 | 1277 | fclose(f); |
1278 | - dprintf(opened, USBPROCBUS_PATH, devices); | |
1278 | + dprintf(USBDBG_DEVOPENED, USBPROCBUS_PATH); | |
1279 | 1279 | goto found_devices; |
1280 | 1280 | } |
1281 | 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 | 1285 | strcpy(devpath, USBDEVBUS_PATH); |
1286 | 1286 | usb_fs_type = USB_FS_DEV; |
1287 | 1287 | fclose(f); |
1288 | - dprintf(opened, USBDEVBUS_PATH, devices); | |
1288 | + dprintf(USBDBG_DEVOPENED, USBDEVBUS_PATH); | |
1289 | 1289 | goto found_devices; |
1290 | 1290 | } |
1291 | 1291 | dir = opendir(USBSYSBUS_PATH "/devices"); |
... | ... | @@ -1294,7 +1294,7 @@ static int usb_host_scan(void *opaque, USBScanFunc *func) |
1294 | 1294 | strcpy(devpath, USBDEVBUS_PATH); |
1295 | 1295 | usb_fs_type = USB_FS_SYS; |
1296 | 1296 | closedir(dir); |
1297 | - dprintf(opened, USBSYSBUS_PATH, devices); | |
1297 | + dprintf(USBDBG_DEVOPENED, USBSYSBUS_PATH); | |
1298 | 1298 | goto found_devices; |
1299 | 1299 | } |
1300 | 1300 | found_devices: | ... | ... |