[PATCH 2/2] libqcdm: remove useless checks on always true condition
Ben Chan
benchan at chromium.org
Sat Oct 27 06:00:06 UTC 2018
result.c: In function ‘qcdm_result_add_u8_array’:
result.c:338:36: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
qcdm_return_if_fail (array_len >= 0);
result.c: In function ‘qcdm_result_add_u16_array’:
result.c:418:36: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
qcdm_return_if_fail (array_len >= 0);
^
---
libqcdm/src/result.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/libqcdm/src/result.c b/libqcdm/src/result.c
index 83c61804..65f6c6a5 100644
--- a/libqcdm/src/result.c
+++ b/libqcdm/src/result.c
@@ -335,7 +335,6 @@ qcdm_result_add_u8_array (QcdmResult *r,
qcdm_return_if_fail (r->refcount > 0);
qcdm_return_if_fail (key != NULL);
qcdm_return_if_fail (array != NULL);
- qcdm_return_if_fail (array_len >= 0);
v = val_new_u8_array (key, array, array_len);
qcdm_return_if_fail (v != NULL);
@@ -415,7 +414,6 @@ qcdm_result_add_u16_array (QcdmResult *r,
qcdm_return_if_fail (r->refcount > 0);
qcdm_return_if_fail (key != NULL);
qcdm_return_if_fail (array != NULL);
- qcdm_return_if_fail (array_len >= 0);
v = val_new_u16_array (key, array, array_len);
qcdm_return_if_fail (v != NULL);
--
2.19.1.568.g152ad8e336-goog
More information about the ModemManager-devel
mailing list