From 22a64fe3e9a7b5dcf97d0b240f2ce09919f4b02f Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 22 Nov 2015 12:36:28 +0100 Subject: [PATCH] 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 --- commands-wds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.30.2