[mw-devel] [Git][arthur/mw][master] Fix -Wmisleading-indentation complaint
Andrew Price
welshbyte at sucs.org
Fri Jul 1 00:48:27 BST 2016
Andrew Price pushed to branch master at Justin Mitchell / mw
Commits:
9198dd40 by Andrew Price at 2016-07-01T00:45:19+01:00
Fix -Wmisleading-indentation complaint
New in gcc 6:
comms.c: In function ‘json_escape’:
comms.c:337:8: error: this ‘else’ clause does not guard... [-Werror=misleading-indentation]
}else
^~~~
comms.c:338:32: note: ...this statement, but the latter is misleadingly
indented as if it is guarded by the ‘else’
mws_add(line, "%c", *in); break;
^~~~~
cc1: all warnings being treated as errors
- - - - -
1 changed file:
- src/webclient/comms.c
Changes:
=====================================
src/webclient/comms.c
=====================================
--- a/src/webclient/comms.c
+++ b/src/webclient/comms.c
@@ -332,10 +332,11 @@ char * json_escape(char *original)
case '\\': mws_add(line, "\\\\"); break;
case '/': mws_add(line, "\\/"); break;
default:
- if (*in < ' ') {
- mws_add(line, "\\u%04x", *in); break;
- }else
- mws_add(line, "%c", *in); break;
+ if (*in < ' ')
+ mws_add(line, "\\u%04x", *in);
+ else
+ mws_add(line, "%c", *in);
+ break;
}
in++;
}
View it on GitLab: https://projects.sucs.org/arthur/mw/commit/9198dd40b73a9afce29b3f4f4747afd014335f00
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/mw-devel/attachments/20160701/3a9c23b5/attachment.html>
More information about the mw-devel
mailing list