From 032872bf6f7c14b0fdbc9cd75daae56bbeb50af0 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 8 Aug 2014 21:02:16 -0700 Subject: Fixing a few warnings and issues. --- includes/BLua.h | 1 + includes/BString.h | 1 - lcrypt/lcrypt_ciphers.c | 1 - win32/project/Balau.vcxproj | 8 ++++---- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/includes/BLua.h b/includes/BLua.h index 1312051..a8df837 100644 --- a/includes/BLua.h +++ b/includes/BLua.h @@ -18,6 +18,7 @@ class Lua; class LuaObjectBase { public: + virtual ~LuaObjectBase() { } virtual void destroy() = 0; void detach() { m_detached = true; } virtual Task * spawnCollector() = 0; diff --git a/includes/BString.h b/includes/BString.h index 447ba93..4f789a7 100644 --- a/includes/BString.h +++ b/includes/BString.h @@ -1,6 +1,5 @@ #pragma once -#define __STDC_FORMAT_MACROS #include #include #include diff --git a/lcrypt/lcrypt_ciphers.c b/lcrypt/lcrypt_ciphers.c index 4dc17ae..91878c5 100644 --- a/lcrypt/lcrypt_ciphers.c +++ b/lcrypt/lcrypt_ciphers.c @@ -105,7 +105,6 @@ static int lcrypt_cipher_ ## name ## _encrypt(lua_State *L) const unsigned char *in = (const unsigned char *)luaL_checklstring(L, 2, &in_length); \ int i, block_length = cipher_descriptor[skey->cipher].block_length; \ int padding_length = in_length + block_length - in_length % block_length; \ -printf("in_length = %d, padding_length = %d\n", in_length, padding_length); \ unsigned char *out = lcrypt_malloc(L, 2 * (in_length + padding_length)); \ memcpy(out + in_length + padding_length, in, in_length); \ memset(out + in_length + padding_length + in_length, padding_length, padding_length); \ diff --git a/win32/project/Balau.vcxproj b/win32/project/Balau.vcxproj index 242c6c4..44ef4ad 100644 --- a/win32/project/Balau.vcxproj +++ b/win32/project/Balau.vcxproj @@ -74,7 +74,7 @@ Level3 Disabled true - PTW32_STATIC_LIB;LTC_SOURCE;LTM_DESC;USE_LTM;LTC_NO_PROTOTYPES;_SCL_SECURE_NO_WARNINGS;CARES_STATICLIB;_CONSOLE;_LIB;CURL_STATICLIB;USE_ARES;DEBUG;_DEBUG;DEBUGBUILD;%(PreprocessorDefinitions) + PTW32_STATIC_LIB;LTC_SOURCE;LTM_DESC;USE_LTM;LTC_NO_PROTOTYPES;_SCL_SECURE_NO_WARNINGS;CARES_STATICLIB;_CONSOLE;_LIB;CURL_STATICLIB;USE_ARES;__STDC_CONSTANT_MACROS;__STDC_LIMIT_MACROS;__STDC_FORMAT_MACROS;DEBUG;_DEBUG;DEBUGBUILD;%(PreprocessorDefinitions) .;.\curl;.\c-ares;..\..\includes;..\..\includes\msc;..\..\libev;..\..\win32;..\..\win32\pthreads-win32;..\..\win32\iconv;..\..\win32\zlib;..\..\win32\regex;..\..\win32\c-ares;..\..\LuaJIT\src;..\..\src\jsoncpp\include;..\..\libtommath;..\..\libtomcrypt\src\headers;..\..\win32\curl\include 4290;4800 $(SolutionDir)\Balau\msvc-config.h @@ -89,7 +89,7 @@ Level3 Disabled true - PTW32_STATIC_LIB;LTC_SOURCE;LTM_DESC;USE_LTM;LTC_NO_PROTOTYPES;_SCL_SECURE_NO_WARNINGS;CARES_STATICLIB;_CONSOLE;_LIB;CURL_STATICLIB;USE_ARES;DEBUG;_DEBUG;DEBUGBUILD;%(PreprocessorDefinitions) + PTW32_STATIC_LIB;LTC_SOURCE;LTM_DESC;USE_LTM;LTC_NO_PROTOTYPES;_SCL_SECURE_NO_WARNINGS;CARES_STATICLIB;_CONSOLE;_LIB;CURL_STATICLIB;USE_ARES;__STDC_CONSTANT_MACROS;__STDC_LIMIT_MACROS;__STDC_FORMAT_MACROS;DEBUG;_DEBUG;DEBUGBUILD;%(PreprocessorDefinitions) .;.\curl;.\c-ares;..\..\includes;..\..\includes\msc;..\..\libev;..\..\win32;..\..\win32\pthreads-win32;..\..\win32\iconv;..\..\win32\zlib;..\..\win32\regex;..\..\win32\c-ares;..\..\LuaJIT\src;..\..\src\jsoncpp\include;..\..\libtommath;..\..\libtomcrypt\src\headers;..\..\win32\curl\include 4290;4800 $(SolutionDir)\Balau\msvc-config.h @@ -105,7 +105,7 @@ true true true - PTW32_STATIC_LIB;LTC_SOURCE;LTM_DESC;USE_LTM;LTC_NO_PROTOTYPES;_SCL_SECURE_NO_WARNINGS;CARES_STATICLIB;_CONSOLE;_LIB;CURL_STATICLIB;USE_ARES;NDEBUG;%(PreprocessorDefinitions) + PTW32_STATIC_LIB;LTC_SOURCE;LTM_DESC;USE_LTM;LTC_NO_PROTOTYPES;_SCL_SECURE_NO_WARNINGS;CARES_STATICLIB;_CONSOLE;_LIB;CURL_STATICLIB;USE_ARES;__STDC_CONSTANT_MACROS;__STDC_LIMIT_MACROS;__STDC_FORMAT_MACROS;NDEBUG;%(PreprocessorDefinitions) .;.\curl;.\c-ares;..\..\includes;..\..\includes\msc;..\..\libev;..\..\win32;..\..\win32\pthreads-win32;..\..\win32\iconv;..\..\win32\zlib;..\..\win32\regex;..\..\win32\c-ares;..\..\LuaJIT\src;..\..\src\jsoncpp\include;..\..\libtommath;..\..\libtomcrypt\src\headers;..\..\win32\curl\include 4290;4800 $(SolutionDir)\Balau\msvc-config.h @@ -123,7 +123,7 @@ true true true - PTW32_STATIC_LIB;LTC_SOURCE;LTM_DESC;USE_LTM;LTC_NO_PROTOTYPES;_SCL_SECURE_NO_WARNINGS;CARES_STATICLIB;_CONSOLE;_LIB;CURL_STATICLIB;USE_ARES;NDEBUG;%(PreprocessorDefinitions) + PTW32_STATIC_LIB;LTC_SOURCE;LTM_DESC;USE_LTM;LTC_NO_PROTOTYPES;_SCL_SECURE_NO_WARNINGS;CARES_STATICLIB;_CONSOLE;_LIB;CURL_STATICLIB;USE_ARES;__STDC_CONSTANT_MACROS;__STDC_LIMIT_MACROS;__STDC_FORMAT_MACROS;NDEBUG;%(PreprocessorDefinitions) .;.\curl;.\c-ares;..\..\includes;..\..\includes\msc;..\..\libev;..\..\win32;..\..\win32\pthreads-win32;..\..\win32\iconv;..\..\win32\zlib;..\..\win32\regex;..\..\win32\c-ares;..\..\LuaJIT\src;..\..\src\jsoncpp\include;..\..\libtommath;..\..\libtomcrypt\src\headers;..\..\win32\curl\include 4290;4800 $(SolutionDir)\Balau\msvc-config.h -- cgit v1.2.3