Many Visual C++ compile warnings and errors fixed.

This commit is contained in:
Jan Vidar Krey
2011-01-02 02:39:25 +01:00
parent adb6641a17
commit 9b57279628
20 changed files with 163 additions and 115 deletions

View File

@@ -29,15 +29,15 @@ struct cfg_tokens
struct cfg_tokens* cfg_tokenize(const char* line)
{
struct cfg_tokens* tokens = hub_malloc_zero(sizeof(struct cfg_tokens));
tokens->list = list_create();
char* buffer = hub_malloc_zero(strlen(line));
struct cfg_tokens* tokens = (struct cfg_tokens*) hub_malloc_zero(sizeof(struct cfg_tokens));
char* buffer = (char*) hub_malloc_zero(strlen(line));
char* out = buffer;
const char* p = line;
int backslash = 0;
char quote = 0;
size_t token_count = 0;
size_t token_size = 0;
tokens->list = list_create();
for (; *p; p++)
{

View File

@@ -21,7 +21,7 @@
int ip_is_valid_ipv4(const char* address)
{
int i = 0; /* address index */
size_t i = 0; /* address index */
int o = 0; /* octet number */
int n = 0; /* numbers after each dot */
int d = 0; /* dots */

View File

@@ -53,11 +53,6 @@ extern const char* uhub_ulltoa(uint64_t val);
extern int uhub_atoi(const char* value);
#ifdef NEED_ATOLL
extern int atoll(const char* value);
#endif
#ifndef HAVE_STRNDUP
extern char* strndup(const char* string, size_t n);
#endif