From: Felix Fietkau Date: Sun, 22 Nov 2015 11:36:28 +0000 (+0100) Subject: wds: cast pdp_type enum to int to avoid clang considering the range check tautological X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=22a64fe3e9a7b5dcf97d0b240f2ce09919f4b02f;p=oweals%2Fuqmi.git wds: cast pdp_type enum to int to avoid clang considering the range check tautological enum overflow behavior is undefined Signed-off-by: Felix Fietkau --- diff --git a/commands-wds.c b/commands-wds.c index fca5fe7..0615a7a 100644 --- a/commands-wds.c +++ b/commands-wds.c @@ -246,7 +246,7 @@ cmd_wds_get_current_settings_cb(struct qmi_dev *qmi, struct qmi_request *req, st t = blobmsg_open_table(&status, NULL); - if (res.set.pdp_type && res.data.pdp_type < ARRAY_SIZE(pdptypes)) + if (res.set.pdp_type && (int) res.data.pdp_type < ARRAY_SIZE(pdptypes)) blobmsg_add_string(&status, "pdp-type", pdptypes[res.data.pdp_type]); if (res.set.ip_family) {