Re: [xslt] more warnings cleanup



Hi again,

Here is another simple one and the changes for the thread stuff (still
get the warnings about redeclaring the symbols).

Stefan
>From 67f6959d3a23f30dff55c31d523f330cd69f888b Mon Sep 17 00:00:00 2001
From: Stefan Kost <ensonic users sf net>
Date: Mon, 9 May 2011 15:11:45 +0300
Subject: [PATCH 06/18] testapi: use the right type for the check

Fixes a compiler warning. Also wrap the long line if statement.
---
 testapi.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/testapi.c b/testapi.c
index df14820..967e49c 100644
--- a/testapi.c
+++ b/testapi.c
@@ -599,7 +599,7 @@ static void des_xmlTextReaderPtr(int no ATTRIBUTE_UNUSED, xmlTextReaderPtr val,
 #endif
 
 #define gen_nb_xmlBufferPtr 3
-static const char *static_buf_content = "a static buffer";
+static const xmlChar *static_buf_content = "a static buffer";
 static xmlBufferPtr gen_xmlBufferPtr(int no, int nr ATTRIBUTE_UNUSED) {
     if (no == 0) return(xmlBufferCreate());
     if (no == 1) return(xmlBufferCreateStatic((void *)static_buf_content, 13));
@@ -18770,7 +18770,9 @@ test_xmlBufferSetAllocationScheme(void) {
         scheme = gen_xmlBufferAllocationScheme(n_scheme, 1);
 
         xmlBufferSetAllocationScheme(buf, scheme);
-        if ((buf != NULL) && (scheme == XML_BUFFER_ALLOC_IMMUTABLE) && (buf->content != NULL) && (buf->content != static_buf_content)) { xmlFree(buf->content); buf->content = NULL;}
+        if ((buf != NULL) && (scheme == XML_BUFFER_ALLOC_IMMUTABLE) && (buf->content != NULL) && (buf->content != static_buf_content)) {
+            xmlFree(buf->content); buf->content = NULL;
+        }
         call_tests++;
         des_xmlBufferPtr(n_buf, buf, 0);
         des_xmlBufferAllocationScheme(n_scheme, scheme, 1);
-- 
1.7.1

>From ed4dc24876c606fb6e987e5e253c977d589b9950 Mon Sep 17 00:00:00 2001
From: Stefan Kost <ensonic users sf net>
Date: Mon, 9 May 2011 15:28:24 +0300
Subject: [PATCH 18/18] threads: fully define the weak-symbols

Fixes compiler warnings about invalid prototypes.
---
 threads.c |   29 +++++++++++++++++------------
 1 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/threads.c b/threads.c
index 1eeac0e..733af31 100644
--- a/threads.c
+++ b/threads.c
@@ -63,29 +63,34 @@ extern int pthread_key_create (pthread_key_t *__key,
 	   __attribute((weak));
 extern int pthread_key_delete (pthread_key_t __key)
 	   __attribute((weak));
-extern int pthread_mutex_init ()
+extern int pthread_mutex_init (pthread_mutex_t *__mutex,
+			      __const pthread_mutexattr_t *__mutexattr)
 	   __attribute((weak));
-extern int pthread_mutex_destroy ()
+extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)
 	   __attribute((weak));
-extern int pthread_mutex_lock ()
+extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
 	   __attribute((weak));
-extern int pthread_mutex_unlock ()
+extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
 	   __attribute((weak));
-extern int pthread_cond_init ()
+extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
+			     __const pthread_condattr_t *__restrict
+			     __cond_attr)
 	   __attribute((weak));
-extern int pthread_cond_destroy ()
+extern int pthread_cond_destroy (pthread_cond_t *__cond)
 	   __attribute((weak));
-extern int pthread_cond_wait ()
+extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
+			      pthread_mutex_t *__restrict __mutex)
 	   __attribute((weak));
-extern int pthread_equal ()
+extern int pthread_cond_signal (pthread_cond_t *__cond)
 	   __attribute((weak));
-extern pthread_t pthread_self ()
+extern int pthread_equal (pthread_t __thread1, pthread_t __thread2)
 	   __attribute((weak));
-extern int pthread_key_create ()
+extern pthread_t pthread_self (void)
 	   __attribute((weak));
-extern int pthread_key_delete ()
+extern int pthread_key_create (pthread_key_t *__key,
+			     void (*__destr_function) (void *))
 	   __attribute((weak));
-extern int pthread_cond_signal ()
+extern int pthread_key_delete (pthread_key_t __key)
 	   __attribute((weak));
 #endif
 #endif /* linux */
-- 
1.7.1



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