diff options
author | Dominic Sacré <dominic.sacre@gmx.de> | 2015-05-11 17:56:50 +0200 |
---|---|---|
committer | Krzysztof Opasiak <k.opasiak@samsung.com> | 2015-05-19 13:55:21 +0200 |
commit | 705d49d2a948dac6cb9083d496fea0ff96a2760e (patch) | |
tree | 175aa6ad63b6ae3323fe5c2ab1bff3652c885490 | |
parent | 9b02f79a280e41b133cb45ff8bb45a84a052cd12 (diff) | |
download | libusbg-705d49d2a948dac6cb9083d496fea0ff96a2760e.tar.gz libusbg-705d49d2a948dac6cb9083d496fea0ff96a2760e.tar.bz2 libusbg-705d49d2a948dac6cb9083d496fea0ff96a2760e.zip |
libusbg: Fix warnings when compiling with -Wall
Remove unused variables and duplicate const specifiers.
This makes libusbg compile cleanly using -Wall with both gcc and clang.
Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de>
Reviewed-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com>
-rw-r--r-- | src/usbg.c | 4 | ||||
-rw-r--r-- | src/usbg_schemes_libconfig.c | 2 |
2 files changed, 2 insertions, 4 deletions
@@ -275,7 +275,7 @@ int usbg_lookup_function_type(const char *name) return USBG_ERROR_NOT_FOUND; } -const const char *usbg_get_function_type_str(usbg_function_type type) +const char *usbg_get_function_type_str(usbg_function_type type) { return type >= USBG_FUNCTION_TYPE_MIN && type < USBG_FUNCTION_TYPE_MAX ? @@ -298,7 +298,7 @@ int usbg_lookup_gadget_attr(const char *name) return USBG_ERROR_NOT_FOUND; } -const const char *usbg_get_gadget_attr_str(usbg_gadget_attr attr) +const char *usbg_get_gadget_attr_str(usbg_gadget_attr attr) { return attr >= USBG_GADGET_ATTR_MIN && attr < USBG_GADGET_ATTR_MAX ? diff --git a/src/usbg_schemes_libconfig.c b/src/usbg_schemes_libconfig.c index d7d2907..f860a46 100644 --- a/src/usbg_schemes_libconfig.c +++ b/src/usbg_schemes_libconfig.c @@ -948,7 +948,6 @@ static int usbg_import_f_ms_lun_attrs(usbg_f_ms_lun_attrs *lattrs, config_setting_t *root) { config_setting_t *node; - int cfg_ret; int i; int ret = USBG_ERROR_NO_MEM; @@ -1010,7 +1009,6 @@ static int usbg_import_f_ms_attrs(config_setting_t *root, usbg_function *f) { config_setting_t *luns_node, *node; int i; - int cfg_ret; int ret = USBG_ERROR_NO_MEM; usbg_function_attrs attrs; usbg_f_ms_attrs *ms_attrs = &attrs.attrs.ms; |