Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix compile warnings in Debian buildd (issue #5)

For example the mips build reports several -Wuninitialized and
-Wunused-but-set-variable warnings. When I compile with these flags
on my own laptop I don't see any warnings and they should be harmless,
but I'd rather just not see any warnings :-)

https://buildd.debian.org/status/fetch.php?pkg=lua-apr&arch=mips&ver=0.17.1-1&stamp=1305069481
  • Loading branch information...
commit 775d7e17ace4e072d98dfc27dffde32eeafd539c 1 parent 8f3fdf2
@xolox authored
View
2  Makefile
@@ -8,7 +8,7 @@
# This makefile has been tested on Ubuntu Linux 10.04 after installing the
# external dependencies using the `install_deps' target (see below).
-VERSION = 0.17.4
+VERSION = 0.17.5
RELEASE = 1
PACKAGE = lua-apr-$(VERSION)-$(RELEASE)
View
4 src/apr.lua
@@ -6,7 +6,7 @@
Last Change: May 15, 2011
Homepage: http://peterodding.com/code/lua/apr/
License: MIT
- Version: 0.17.4
+ Version: 0.17.5
This Lua script is executed on require("apr"), loads the binary module using
require("apr.core"), defines several library functions implemented on top of
@@ -15,7 +15,7 @@
--]]
local apr = require 'apr.core'
-apr._VERSION = '0.17.4'
+apr._VERSION = '0.17.5'
-- apr.md5(input [, binary]) -> digest {{{1
--
View
7 src/io_net.c
@@ -29,11 +29,12 @@ static apr_status_t socket_alloc(lua_State *L, int family, int protocol, lua_apr
apr_status_t status;
object = new_object(L, &lua_apr_socket_type);
+ if (object == NULL)
+ raise_error_memory(L);
object->family = family;
object->protocol = protocol;
status = apr_pool_create(&object->pool, NULL);
- if (status == APR_SUCCESS)
- *objptr = object;
+ *objptr = object;
return status;
}
@@ -350,7 +351,7 @@ static int socket_listen(lua_State *L)
static int socket_accept(lua_State *L)
{
- lua_apr_socket *server, *client;
+ lua_apr_socket *server, *client = NULL;
apr_status_t status;
server = socket_check(L, 1, 1);
View
8 src/memcache.c
@@ -3,7 +3,7 @@
* Authors:
* - zhiguo zhao <zhaozg@gmail.com>
* - Peter Odding <peter@peterodding.com>
- * Last Change: March 27, 2011
+ * Last Change: May 15, 2011
* Homepage: http://peterodding.com/code/lua/apr/
* License: MIT
*
@@ -430,13 +430,12 @@ static int mc_decr(lua_State *L)
static int mc_version(lua_State *L)
{
- apr_memcache_t *client;
apr_memcache_server_t *server;
apr_status_t status;
char* value;
size_t length;
- client = check_mc_client(L, 1);
+ (void)check_mc_client(L, 1);
server = check_mc_server(L, 2);
status = apr_memcache_version(server, server->p, &value);
if (status != APR_SUCCESS)
@@ -480,12 +479,11 @@ static int mc_version(lua_State *L)
static int mc_stats(lua_State *L)
{
- apr_memcache_t *client;
apr_memcache_server_t *server;
apr_memcache_stats_t *stats;
apr_status_t status;
- client = check_mc_client(L, 1);
+ (void)check_mc_client(L, 1);
server = check_mc_server(L, 2);
status = apr_memcache_stats(server, server->p, &stats);
if (status != APR_SUCCESS)
View
9 src/proc.c
@@ -1,7 +1,7 @@
/* Process handling module for the Lua/APR binding.
*
* Author: Peter Odding <peter@peterodding.com>
- * Last Change: February 19, 2011
+ * Last Change: May 15, 2011
* Homepage: http://peterodding.com/code/lua/apr/
* License: MIT
*/
@@ -134,12 +134,7 @@ static void close_pipe(lua_State *L, const char *key)
int lua_apr_proc_create(lua_State *L)
{
- lua_apr_proc *process;
- const char *program;
-
- program = luaL_checkstring(L, 1);
- process = proc_alloc(L, program);
-
+ proc_alloc(L, luaL_checkstring(L, 1));
return 1;
}
View
6 src/thread.c
@@ -1,7 +1,7 @@
/* Multi threading module for the Lua/APR binding.
*
* Author: Peter Odding <peter@peterodding.com>
- * Last Change: February 19, 2011
+ * Last Change: May 15, 2011
* Homepage: http://peterodding.com/code/lua/apr/
* License: MIT
*
@@ -133,7 +133,7 @@ static void* lua_apr_cc thread_runner(apr_thread_t *handle, lua_apr_thread *thre
const char *function;
size_t length;
lua_State *L;
- int nargs, status;
+ int status;
/* The child thread is now using the thread structure. */
object_incref((lua_apr_refobj*)thread);
@@ -145,7 +145,7 @@ static void* lua_apr_cc thread_runner(apr_thread_t *handle, lua_apr_thread *thre
luaL_openlibs(L); /* load standard library */
lua_settop(L, 0); /* normalize stack */
lua_pushcfunction(L, error_handler); /* push error handler */
- nargs = push_tuple(L, thread->input); /* push thread arguments */
+ push_tuple(L, thread->input); /* push thread arguments */
function = lua_tolstring(L, 2, &length); /* compile chunk */
if (luaL_loadbuffer(L, function, length, function)) {
thread->output = strdup(lua_tostring(L, -1));
Please sign in to comment.
Something went wrong with that request. Please try again.