summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-10-04 14:37:55 +0200
committerFelix Fietkau <nbd@openwrt.org>2012-10-04 14:37:55 +0200
commit4e27cbe55a0ef7622c085e6172865773e1c2575e (patch)
tree0925f5e867be7c3d3887cfbcbb6dbc3b9908d034
parentb20ffa963c767ea53acb448354bdf13187ebe644 (diff)
downloaduhttpd-4e27cbe55a0ef7622c085e6172865773e1c2575e.tar.gz
lua: add explicit typecasts to fix compiler warnings
-rw-r--r--uhttpd-lua.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/uhttpd-lua.c b/uhttpd-lua.c
index e113937..6e150b5 100644
--- a/uhttpd-lua.c
+++ b/uhttpd-lua.c
@@ -84,7 +84,7 @@ static int uh_lua_send_common(lua_State *L, bool chunked)
{
if (length > 0)
{
- snprintf(chunk, sizeof(chunk), "%X\r\n", length);
+ snprintf(chunk, sizeof(chunk), "%X\r\n", (int) length);
ensure_out(rv = uh_raw_send(fd, chunk, strlen(chunk), to));
slen += rv;
@@ -517,7 +517,7 @@ bool uh_lua_request(struct client *cl, lua_State *L)
"Content-Length: %i\r\n\r\n"
"Lua raised a runtime error:\n %s\n",
http_versions[req->version],
- 31 + strlen(err_str), err_str);
+ 31 + (int) strlen(err_str), err_str);
break;