Browse Source

Adjust code for higher warning level

bel 8 years ago
parent
commit
85ec6ea893
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/civetweb.c

+ 2 - 1
src/civetweb.c

@@ -9387,7 +9387,8 @@ mg_websocket_write_exec(struct mg_connection *conn,
 
 	int retval = -1;
 
-	header[0] = 0x80 + (((unsigned char)opcode) & 0xF);
+	header[0] =
+	    (unsigned char)0x80u + ((unsigned char)opcode & (unsigned char)0xFu);
 
 	/* Frame format: http://tools.ietf.org/html/rfc6455#section-5.2 */
 	if (dataLen < 126) {