gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] branch master updated: fixing c99 issues re


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] branch master updated: fixing c99 issues reported in #5826
Date: Sat, 24 Aug 2019 00:05:55 +0200

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

grothoff pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new 8eae5667 fixing c99 issues reported in #5826
8eae5667 is described below

commit 8eae5667edfb303f9d15d568d78b9db468d7e2ca
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Aug 24 00:04:15 2019 +0200

    fixing c99 issues reported in #5826
---
 src/microhttpd/memorypool.c |  2 +-
 src/microhttpd/test_md5.c   | 35 ++++++++++++++++++++++++++---------
 2 files changed, 27 insertions(+), 10 deletions(-)

diff --git a/src/microhttpd/memorypool.c b/src/microhttpd/memorypool.c
index 6f74db83..96c20ea6 100644
--- a/src/microhttpd/memorypool.c
+++ b/src/microhttpd/memorypool.c
@@ -78,7 +78,7 @@
 static size_t MHD_sys_page_size_ = MHD_DEF_PAGE_SIZE_; /* Default fallback 
value */
 
 /**
- * Initilise values for memory pools
+ * Initialise values for memory pools
  */
 void
 MHD_init_mem_pools_ (void)
diff --git a/src/microhttpd/test_md5.c b/src/microhttpd/test_md5.c
index 58eb1c7e..d9517206 100644
--- a/src/microhttpd/test_md5.c
+++ b/src/microhttpd/test_md5.c
@@ -185,6 +185,7 @@ bin2hex (const uint8_t *bin,
   *hex = 0;
 }
 
+
 static int
 check_result (const char *test_name,
               unsigned int check_num,
@@ -220,10 +221,12 @@ check_result (const char *test_name,
  */
 
 /* Calculated MD5 as one pass for whole data */
-int test1_str(void)
+static int
+test1_str(void)
 {
+  unsigned int i;
   int num_failed = 0;
-  for (unsigned int i = 0; i < units1_num; i++)
+  for (i = 0; i < units1_num; i++)
     {
       struct MD5Context ctx;
       uint8_t digest[MD5_DIGEST_SIZE];
@@ -237,10 +240,14 @@ int test1_str(void)
   return num_failed;
 }
 
-int test1_bin(void)
+
+static int
+test1_bin(void)
 {
+  unsigned int i;
   int num_failed = 0;
-  for (unsigned int i = 0; i < units2_num; i++)
+  
+  for (i = 0; i < units2_num; i++)
     {
       struct MD5Context ctx;
       uint8_t digest[MD5_DIGEST_SIZE];
@@ -254,11 +261,15 @@ int test1_bin(void)
   return num_failed;
 }
 
+
 /* Calculated MD5 as two iterations for whole data */
-int test2_str(void)
+static int
+test2_str(void)
 {
+  unsigned int i;
   int num_failed = 0;
-  for (unsigned int i = 0; i < units1_num; i++)
+
+  for (i = 0; i < units1_num; i++)
     {
       struct MD5Context ctx;
       uint8_t digest[MD5_DIGEST_SIZE];
@@ -274,10 +285,14 @@ int test2_str(void)
   return num_failed;
 }
 
-int test2_bin(void)
+
+static int
+test2_bin(void)
 {
+  unsigned int i;
   int num_failed = 0;
-  for (unsigned int i = 0; i < units2_num; i++)
+  
+  for (i = 0; i < units2_num; i++)
     {
       struct MD5Context ctx;
       uint8_t digest[MD5_DIGEST_SIZE];
@@ -293,7 +308,9 @@ int test2_bin(void)
   return num_failed;
 }
 
-int main(int argc, char * argv[])
+
+int
+main(int argc, char * argv[])
 {
   int num_failed = 0;
   (void)has_in_name; /* Mute compiler warning. */

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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