# HG changeset patch # User Paul Aurich # Date 1309724016 25200 # Node ID 708d396957903140a81ca8091e5b0c025c04d3d8 # Parent b6271d3bae0b40f28ff228846d69c87baf56170a context: Clean up some warnings diff -r b6271d3bae0b -r 708d39695790 src/context.c --- a/src/context.c Sun Jul 03 13:13:36 2011 -0700 +++ b/src/context.c Sun Jul 03 13:13:36 2011 -0700 @@ -138,7 +138,7 @@ /** * Find the protocol. */ -static SSL_METHOD* str2method(const char *method) +static const SSL_METHOD* str2method(const char *method) { if (!strcmp(method, "sslv3")) return SSLv3_method(); if (!strcmp(method, "tlsv1")) return TLSv1_method(); @@ -231,7 +231,7 @@ static int create(lua_State *L) { p_context ctx; - SSL_METHOD *method; + const SSL_METHOD *method; if (luasec_sslctx_idx == -1) { luasec_sslctx_idx = SSL_CTX_get_ex_new_index(0, "luasec sslctx context", NULL, NULL, NULL); @@ -493,7 +493,6 @@ { int i; int flag = 0, vflag = 0; - int ignore_errors = 0; p_context ctx = checkctx(L, 1); int max = lua_gettop(L); /* any flag? */ @@ -503,7 +502,6 @@ const char *s = luaL_checkstring(L, i); if (!strcmp(s, "continue")) { ctx->verify_flags |= LUASEC_VERIFY_FLAGS_ALWAYS_CONTINUE; - ignore_errors = 1; } else if (!strcmp(s, "ignore_purpose")) { ctx->verify_flags |= LUASEC_VERIFY_FLAGS_IGNORE_PURPOSE; } else if (!strcmp(s, "crl_check")) {