[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 02/02: examples/sessions.c: fixed compiler warnings
From: |
gnunet |
Subject: |
[libmicrohttpd] 02/02: examples/sessions.c: fixed compiler warnings |
Date: |
Fri, 15 Sep 2023 08:31:01 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit e52c9e246873140da0cefd66bd438d541b1f2a6a
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Fri Sep 15 09:30:43 2023 +0300
examples/sessions.c: fixed compiler warnings
---
doc/examples/sessions.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/examples/sessions.c b/doc/examples/sessions.c
index f15c03cc..2f3e6fe5 100644
--- a/doc/examples/sessions.c
+++ b/doc/examples/sessions.c
@@ -306,12 +306,12 @@ fill_v1_form (const void *cls,
if (0 > reply_len)
return MHD_NO; /* Internal error */
- reply = (char *) malloc (reply_len + 1);
+ reply = (char *) malloc ((size_t) ((size_t) reply_len + 1));
if (NULL == reply)
return MHD_NO; /* Out-of-memory error */
if (reply_len != snprintf (reply,
- ((size_t) reply_len) + 1,
+ (size_t) (((size_t) reply_len) + 1),
FORM_V1,
session->value_1))
{
@@ -370,12 +370,12 @@ fill_v1_v2_form (const void *cls,
if (0 > reply_len)
return MHD_NO; /* Internal error */
- reply = (char *) malloc (reply_len + 1);
+ reply = (char *) malloc ((size_t) ((size_t) reply_len + 1));
if (NULL == reply)
return MHD_NO; /* Out-of-memory error */
if (reply_len != snprintf (reply,
- ((size_t) reply_len) + 1,
+ (size_t) ((size_t) reply_len + 1),
FORM_V1_V2,
session->value_1,
session->value_2))
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.