gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] branch master updated (e3673e4f -> f8e19851)


From: gnunet
Subject: [libmicrohttpd] branch master updated (e3673e4f -> f8e19851)
Date: Tue, 30 Jan 2024 23:07:07 +0100

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a change to branch master
in repository libmicrohttpd.

    from e3673e4f Moved test_quiesce to heavy tests
     new 4f494d00 Fixed compiler warnings
     new 303e34fc Fixed tests with GnuTLS in non-default path
     new a88f3149 Muted some compiler warnings
     new f8e19851 configure: sorted messages in final config summary

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 configure.ac               | 20 ++++++++++----------
 src/examples/demo.c        |  7 ++++---
 src/examples/demo_https.c  |  7 ++++---
 src/microhttpd/Makefile.am |  4 ++++
 src/microhttpd/mhd_str.c   |  6 +++---
 5 files changed, 25 insertions(+), 19 deletions(-)

diff --git a/configure.ac b/configure.ac
index 90e18c25..17bee6b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6056,32 +6056,32 @@ AC_MSG_NOTICE([GNU libmicrohttpd ${PACKAGE_VERSION} 
Configuration Summary:
   Target directory:  ${prefix}
   Cross-compiling:   ${cross_compiling}
   Operating System:  ${mhd_host_os}${os_ver_msg}
+  Threading lib:     ${USE_THREADS}
+  Inter-thread comm: ${use_itc}
+  Shutdown of listening socket triggers select: 
${mhd_cv_host_shtdwn_trgr_select}
+  poll support:      ${enable_poll=no}
+  epoll support:     ${enable_epoll=no}
+  sendfile used:     ${found_sendfile}
+  HTTPS support:     ${MSG_HTTPS}
   Messages:          ${enable_messages}
   Cookie parsing:    ${enable_cookie}
   Postproc:          ${enable_postprocessor}
-  HTTP "Upgrade":    ${enable_httpupgrade}
   Basic auth.:       ${enable_bauth}
   Digest auth.:      ${enable_dauth}
   Digest auth. defaults: ${dauth_defs_MSG}
   MD5:               ${enable_md5_MSG}
   SHA-256:           ${enable_sha256_MSG}
   SHA-512/256:       ${enable_sha512_256_MSG}
-  Shutdown of listening socket triggers select: 
${mhd_cv_host_shtdwn_trgr_select}
-  Inter-thread comm: ${use_itc}
-  Threading lib:     ${USE_THREADS}
-  poll support:      ${enable_poll=no}
-  epoll support:     ${enable_epoll=no}
-  sendfile used:     ${found_sendfile}
-  HTTPS support:     ${MSG_HTTPS}
+  HTTP "Upgrade":    ${enable_httpupgrade}
   Compact code:      ${enable_compact_code} (${compact_code_MSG})
   Use thread names:  ${enable_thread_names}
   Use debug asserts: ${use_asserts_MSG=no}
   Use sanitizers:    ${enabled_sanitizers:=no}
+  Build static lib:  ${enable_static}
+  Build shared lib:  ${enable_shared}
   Build docs:        ${enable_doc}
   Build examples:    ${enable_examples}
   Build tools:       ${enable_examples}
-  Build static lib:  ${enable_static}
-  Build shared lib:  ${enable_shared}
   Test with libcurl: ${MSG_CURL}
   Heavy tests:       ${use_heavy_tests_MSG}
   Fuzzing tests:     ${run_zzuf_tests_MSG=no}
diff --git a/src/examples/demo.c b/src/examples/demo.c
index 3134d5ed..bae63d74 100644
--- a/src/examples/demo.c
+++ b/src/examples/demo.c
@@ -793,8 +793,8 @@ generate_page (void *cls,
     /* read beginning of the file to determine mime type  */
     got = read (fd, file_data, sizeof (file_data));
     (void) lseek (fd, 0, SEEK_SET);
-    if (-1 != got)
-      mime = magic_buffer (magic, file_data, got);
+    if (0 < got)
+      mime = magic_buffer (magic, file_data, (size_t) got);
     else
 #endif /* MHD_HAVE_LIBMAGIC */
     mime = NULL;
@@ -1002,7 +1002,8 @@ main (int argc, char *const *argv)
                         MHD_OPTION_PER_IP_CONNECTION_LIMIT, (unsigned int) 
(64),
 #endif
                         MHD_OPTION_CONNECTION_TIMEOUT, (unsigned
-                                                        int) (120 /* seconds 
*/),
+                                                        int) (120 /* seconds 
*/)
+                        ,
                         MHD_OPTION_THREAD_POOL_SIZE, (unsigned
                                                       int) NUMBER_OF_THREADS,
                         MHD_OPTION_NOTIFY_COMPLETED,
diff --git a/src/examples/demo_https.c b/src/examples/demo_https.c
index 6658408a..4b937af1 100644
--- a/src/examples/demo_https.c
+++ b/src/examples/demo_https.c
@@ -794,8 +794,8 @@ generate_page (void *cls,
     /* read beginning of the file to determine mime type  */
     got = read (fd, file_data, sizeof (file_data));
     (void) lseek (fd, 0, SEEK_SET);
-    if (-1 != got)
-      mime = magic_buffer (magic, file_data, got);
+    if (0 < got)
+      mime = magic_buffer (magic, file_data, (size_t) got);
     else
 #endif /* MHD_HAVE_LIBMAGIC */
     mime = NULL;
@@ -1046,7 +1046,8 @@ main (int argc, char *const *argv)
                         MHD_OPTION_PER_IP_CONNECTION_LIMIT, (unsigned int) 
(64),
 #endif
                         MHD_OPTION_CONNECTION_TIMEOUT, (unsigned
-                                                        int) (120 /* seconds 
*/),
+                                                        int) (120 /* seconds 
*/)
+                        ,
                         MHD_OPTION_THREAD_POOL_SIZE, (unsigned
                                                       int) NUMBER_OF_THREADS,
                         MHD_OPTION_NOTIFY_COMPLETED,
diff --git a/src/microhttpd/Makefile.am b/src/microhttpd/Makefile.am
index e178a5e4..a802b580 100644
--- a/src/microhttpd/Makefile.am
+++ b/src/microhttpd/Makefile.am
@@ -445,6 +445,8 @@ test_postprocessor_md_SOURCES = \
   test_postprocessor_md.c postprocessor.h postprocessor.c \
   internal.h internal.c mhd_str.h mhd_str.c \
   mhd_panic.h mhd_panic.c
+test_postprocessor_md_CPPFLAGS = \
+  $(AM_CPPFLAGS) $(MHD_TLS_LIB_CPPFLAGS)
 
 test_shutdown_select_SOURCES = \
   test_shutdown_select.c
@@ -558,6 +560,8 @@ test_sha1_SOURCES = \
 
 test_auth_parse_SOURCES = \
   test_auth_parse.c gen_auth.c gen_auth.h  mhd_str.h mhd_str.c mhd_assert.h
+test_auth_parse_CPPFLAGS = \
+  $(AM_CPPFLAGS) $(MHD_TLS_LIB_CPPFLAGS)
 
 test_str_quote_SOURCES = \
   test_str_quote.c mhd_str.h mhd_str.c mhd_assert.h
diff --git a/src/microhttpd/mhd_str.c b/src/microhttpd/mhd_str.c
index d01086ac..29c8f3f9 100644
--- a/src/microhttpd/mhd_str.c
+++ b/src/microhttpd/mhd_str.c
@@ -1575,7 +1575,7 @@ MHD_uint16_to_str (uint16_t val,
     buf_size--;
     if (1 == divisor)
       return (size_t) (chr - buf);
-    val %= divisor;
+    val = (uint16_t) (val % divisor);
     divisor /= 10;
     digit = (int) (val / divisor);
     mhd_assert (digit < 10);
@@ -1733,8 +1733,8 @@ MHD_hex_to_bin (const char *hex,
     const int l = toxdigitvalue (hex[r++]);
     if ((0 > h) || (0 > l))
       return 0;
-    out[w++] = ( ((uint8_t) (((uint8_t) ((unsigned int) h)) << 4))
-                 | ((uint8_t) ((unsigned int) l)) );
+    out[w++] = (uint8_t) ( ((uint8_t) (((uint8_t) ((unsigned int) h)) << 4))
+                           | ((uint8_t) ((unsigned int) l)) );
   }
   mhd_assert (len == r);
   mhd_assert ((len + 1) / 2 == w);

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]