libmicrohttpd2

HTTP server C library (MHD 2.x, alpha)
Log | Files | Refs | README | LICENSE

commit a8de1b1bc80da19bd738d07e8b692c6ae68eedbb
parent 2d5fd416d4abbe7170a151af4a9265256e55f9f1
Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Date:   Sat,  3 May 2025 17:45:05 +0200

demo.c: fixed compiler warnings

Diffstat:
Msrc/examples2/demo.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/examples2/demo.c b/src/examples2/demo.c @@ -122,7 +122,7 @@ typedef CRITICAL_SECTION my_mutex_t; # define my_mkstemp(tmpl) mkstemp ((tmpl)) #else static int -my_mkstemp (char *template) +my_mkstemp (char *tmpl) { int i; @@ -131,7 +131,7 @@ my_mkstemp (char *template) char tmp_file_name[PATH_MAX + 1]; HANDLE hndl; if (0 == GetTempFileNameA (".", - template, + tmpl, 0, tmp_file_name)) return -1; @@ -149,7 +149,7 @@ my_mkstemp (char *template) _O_RDWR | _O_BINARY); if (-1 != fd) { - strcpy (template, tmp_file_name); + strcpy (tmpl, tmp_file_name); return fd; /* Success */ } @@ -174,7 +174,7 @@ my_strdup (const char *str) char *str_copy; sz = strlen (str); - str_copy = malloc (sz); + str_copy = (char *) malloc (sz); if (NULL != str_copy) memcpy (str_copy, str, sz); return str_copy;