From: Felix Fietkau Date: Thu, 2 Oct 2014 09:46:04 +0000 (+0200) Subject: silence a compiler warning about adding an int to a string X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=11102e7e2015063728b126b9e86266a940ed596b;p=project%2Fuqmi.git silence a compiler warning about adding an int to a string Signed-off-by: Felix Fietkau --- diff --git a/commands-wms.c b/commands-wms.c index e3744c1..01e6867 100644 --- a/commands-wms.c +++ b/commands-wms.c @@ -389,7 +389,7 @@ static void cmd_wms_get_raw_message_cb(struct qmi_dev *qmi, struct qmi_request * data = (unsigned char *) res.data.raw_message_data.raw_data; str = blobmsg_alloc_string_buffer(&status, NULL, res.data.raw_message_data.raw_data_n * 3); for (i = 0; i < res.data.raw_message_data.raw_data_n; i++) { - str += sprintf(str, " %02x" + (i ? 0 : 1), data[i]); + str += sprintf(str, &" %02x"[i ? 0 : 1], data[i]); } blobmsg_add_string_buffer(&status); }