Commit 9198dd40 authored by Andrew Price's avatar Andrew Price
Browse files

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
parent ec8ad16a
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -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++;
	}