diff options
-rw-r--r-- | libwacom/libwacom.h | 8 | ||||
-rw-r--r-- | test/test-load.c | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/libwacom/libwacom.h b/libwacom/libwacom.h index 1f7a336..49bc3a6 100644 --- a/libwacom/libwacom.h +++ b/libwacom/libwacom.h @@ -376,6 +376,10 @@ const char* libwacom_get_layout_filename(const WacomDevice *device); /** * @param device The tablet to query * @return The numeric vendor ID for this device + * + * @bug The return value is a signed int but libwacom_match_get_vendor_id() + * returns an unsigned int. This may cause compiler warnings, but the + * effective range for vendor IDs is 16-bit only anyway. */ int libwacom_get_vendor_id(const WacomDevice *device); @@ -412,6 +416,10 @@ const WacomMatch* libwacom_get_paired_device(const WacomDevice *device); /** * @param device The tablet to query * @return The numeric product ID for this device + * + * @bug The return value is a signed int but libwacom_match_get_product_id() + * returns an unsigned int. This may cause compiler warning, but the + * effective range for product IDs is 16-bit only anyway. */ int libwacom_get_product_id(const WacomDevice *device); diff --git a/test/test-load.c b/test/test-load.c index b1c5236..3afaa43 100644 --- a/test/test-load.c +++ b/test/test-load.c @@ -49,9 +49,9 @@ static void check_multiple_match(WacomDevice *device) nmatches++; if (libwacom_match_get_bustype(*match) == libwacom_get_bustype(device)) found_bus = 1; - if (libwacom_match_get_vendor_id(*match) == libwacom_get_vendor_id(device)) + if ((int)libwacom_match_get_vendor_id(*match) == libwacom_get_vendor_id(device)) found_vendor_id = 1; - if (libwacom_match_get_product_id(*match) == libwacom_get_product_id(device)) + if ((int)libwacom_match_get_product_id(*match) == libwacom_get_product_id(device)) found_product_id = 1; } |