Many Visual C++ compile warnings and errors fixed.
This commit is contained in:
@@ -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++)
|
||||
{
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user