mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
Compiler warning fixes
This commit is contained in:
+4
-4
@@ -3037,8 +3037,8 @@ extern "C"
|
||||
#endif
|
||||
struct tm* gmtime_s(const time_t* time, struct tm* result);
|
||||
]], [[
|
||||
struct tm res;
|
||||
time_t t;
|
||||
static struct tm res;
|
||||
static time_t t = 0;
|
||||
gmtime_s (&t, &res);
|
||||
]])
|
||||
],
|
||||
@@ -3058,8 +3058,8 @@ extern "C"
|
||||
#endif
|
||||
errno_t gmtime_s(struct tm* _tm, const time_t* time);
|
||||
]], [[
|
||||
struct tm res;
|
||||
time_t t;
|
||||
static struct tm res;
|
||||
static time_t t = 0;
|
||||
gmtime_s (&res, &t);
|
||||
]])
|
||||
],
|
||||
|
||||
@@ -382,15 +382,15 @@ BASE64Encode (const void *in, size_t len, char **output)
|
||||
c = (data[i] << 4) & 0x3F;
|
||||
if (++i < len)
|
||||
{
|
||||
c |= (data[i] >> 4) & 0x0F;
|
||||
c = (char) (c | ((data[i] >> 4) & 0x0F));
|
||||
}
|
||||
opt[ret++] = cvt[(int) c];
|
||||
if (i < len)
|
||||
{
|
||||
c = (data[i] << 2) & 0x3F;
|
||||
c = (char) (c | ((data[i] << 2) & 0x3F));
|
||||
if (++i < len)
|
||||
{
|
||||
c |= (data[i] >> 6) & 0x03;
|
||||
c = (char) (c | ((data[i] >> 6) & 0x03));
|
||||
}
|
||||
opt[ret++] = cvt[(int) c];
|
||||
}
|
||||
|
||||
@@ -193,13 +193,13 @@ mp_ptr_diff_ (const void *p1, const void *p2)
|
||||
/**
|
||||
* Size of memory page
|
||||
*/
|
||||
static size_t MHD_sys_page_size_ =
|
||||
static size_t MHD_sys_page_size_ = (size_t)
|
||||
#if defined(MHD_USE_PAGESIZE_MACRO_STATIC)
|
||||
PAGESIZE;
|
||||
PAGESIZE;
|
||||
#elif defined(MHD_USE_PAGE_SIZE_MACRO_STATIC)
|
||||
PAGE_SIZE;
|
||||
PAGE_SIZE;
|
||||
#else /* ! MHD_USE_PAGE_SIZE_MACRO_STATIC */
|
||||
_MHD_FALLBACK_PAGE_SIZE; /* Default fallback value */
|
||||
_MHD_FALLBACK_PAGE_SIZE; /* Default fallback value */
|
||||
#endif /* ! MHD_USE_PAGE_SIZE_MACRO_STATIC */
|
||||
|
||||
/**
|
||||
@@ -214,13 +214,13 @@ MHD_init_mem_pools_ (void)
|
||||
if (-1 != result)
|
||||
MHD_sys_page_size_ = (size_t) result;
|
||||
else
|
||||
MHD_sys_page_size_ = MHD_DEF_PAGE_SIZE_;
|
||||
MHD_sys_page_size_ = (size_t) MHD_DEF_PAGE_SIZE_;
|
||||
#elif defined(_WIN32)
|
||||
SYSTEM_INFO si;
|
||||
GetSystemInfo (&si);
|
||||
MHD_sys_page_size_ = (size_t) si.dwPageSize;
|
||||
#else
|
||||
MHD_sys_page_size_ = MHD_DEF_PAGE_SIZE_;
|
||||
MHD_sys_page_size_ = (size_t) MHD_DEF_PAGE_SIZE_;
|
||||
#endif /* _WIN32 */
|
||||
mhd_assert (0 == (MHD_sys_page_size_ % ALIGN_SIZE));
|
||||
}
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
* @author Karlson2k (Evgeny Grin)
|
||||
*/
|
||||
|
||||
#include "mhd_options.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "mhd_options.h"
|
||||
#include "microhttpd.h"
|
||||
#include "test_helpers.h"
|
||||
|
||||
|
||||
@@ -32,11 +32,11 @@
|
||||
* @author Karlson2k (Evgeny Grin)
|
||||
*/
|
||||
|
||||
#include "mhd_options.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include "mhd_options.h"
|
||||
#include "microhttpd.h"
|
||||
#include "mhd_tool_str_to_uint.h"
|
||||
#include "mhd_tool_get_cpu_count.h"
|
||||
|
||||
Reference in New Issue
Block a user