浏览代码

Squashed build warning

Sergey Lyubka 13 年之前
父节点
当前提交
0ede6a35f4
共有 1 个文件被更改,包括 7 次插入12 次删除
  1. 7 12
      examples/chat.c

+ 7 - 12
examples/chat.c

@@ -1,14 +1,9 @@
-/*
- * This file is part of the Mongoose project, http://code.google.com/p/mongoose
- * It implements an online chat server. For more details,
- * see the documentation on the project web site.
- * To test the application,
- *  1. type "make" in the directory where this file lives
- *  2. point your browser to http://127.0.0.1:8081
- *
- * NOTE(lsm): this file follows Google style, not BSD style as the rest of
- * Mongoose code.
- */
+// This file is part of the Mongoose project, http://code.google.com/p/mongoose
+// It implements an online chat server. For more details,
+// see the documentation on the project web site.
+// To test the application,
+// 1. type "make" in the directory where this file lives
+// 2. point your browser to http://127.0.0.1:8081
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -324,7 +319,7 @@ static void redirect_to_ssl(struct mg_connection *conn,
   if (host != NULL && (p = strchr(host, ':')) != NULL) {
     mg_printf(conn, "HTTP/1.1 302 Found\r\n"
               "Location: https://%.*s:8082/%s:8082\r\n\r\n",
-              p - host, host, request_info->uri);
+              (int) (p - host), host, request_info->uri);
   } else {
     mg_printf(conn, "%s", "HTTP/1.1 500 Error\r\n\r\nHost: header is not set");
   }