qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject svn commit: r1554940 - in /qpid/proton/trunk: examples/include/pncompat/ examples/messenger/c/ proton-c/ proton-c/include/proton/ proton-c/src/ proton-c/src/codec/ proton-c/src/messenger/ proton-c/src/posix/ proton-c/src/ssl/ proton-c/src/tests/ tests/...
Date Thu, 02 Jan 2014 22:20:21 GMT
Author: rhs
Date: Thu Jan  2 22:20:21 2014
New Revision: 1554940

URL: http://svn.apache.org/r1554940
Log:
PROTON-420: added -Wstrict-prototypes to compile flags

Modified:
    qpid/proton/trunk/examples/include/pncompat/misc_defs.h
    qpid/proton/trunk/examples/messenger/c/recv.c
    qpid/proton/trunk/examples/messenger/c/send.c
    qpid/proton/trunk/proton-c/CMakeLists.txt
    qpid/proton/trunk/proton-c/include/proton/scanner.h
    qpid/proton/trunk/proton-c/src/codec/decoder.h
    qpid/proton/trunk/proton-c/src/codec/encoder.h
    qpid/proton/trunk/proton-c/src/messenger/store.h
    qpid/proton/trunk/proton-c/src/messenger/transform.h
    qpid/proton/trunk/proton-c/src/posix/driver.c
    qpid/proton/trunk/proton-c/src/proton.c
    qpid/proton/trunk/proton-c/src/ssl/openssl.c
    qpid/proton/trunk/proton-c/src/tests/message.c
    qpid/proton/trunk/proton-c/src/tests/object.c
    qpid/proton/trunk/tests/tools/apps/c/msgr-common.h

Modified: qpid/proton/trunk/examples/include/pncompat/misc_defs.h
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/examples/include/pncompat/misc_defs.h?rev=1554940&r1=1554939&r2=1554940&view=diff
==============================================================================
--- qpid/proton/trunk/examples/include/pncompat/misc_defs.h (original)
+++ qpid/proton/trunk/examples/include/pncompat/misc_defs.h Thu Jan  2 22:20:21 2014
@@ -43,6 +43,6 @@
 #include "internal/getopt.h"
 #endif
 
-pn_timestamp_t time_now();
+pn_timestamp_t time_now(void);
 
 #endif /* PNCOMPAT_MISC_DEFS_H */

Modified: qpid/proton/trunk/examples/messenger/c/recv.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/examples/messenger/c/recv.c?rev=1554940&r1=1554939&r2=1554940&view=diff
==============================================================================
--- qpid/proton/trunk/examples/messenger/c/recv.c (original)
+++ qpid/proton/trunk/examples/messenger/c/recv.c Thu Jan  2 22:20:21 2014
@@ -40,7 +40,7 @@ void die(const char *file, int line, con
   exit(1);
 }
 
-void usage()
+void usage(void)
 {
   printf("Usage: recv [options] <addr>\n");
   printf("-c    \tPath to the certificate file.\n");

Modified: qpid/proton/trunk/examples/messenger/c/send.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/examples/messenger/c/send.c?rev=1554940&r1=1554939&r2=1554940&view=diff
==============================================================================
--- qpid/proton/trunk/examples/messenger/c/send.c (original)
+++ qpid/proton/trunk/examples/messenger/c/send.c Thu Jan  2 22:20:21 2014
@@ -41,7 +41,7 @@ void die(const char *file, int line, con
   exit(1);
 }
 
-void usage()
+void usage(void)
 {
   printf("Usage: send [-a addr] [message]\n");
   printf("-a     \tThe target address [amqp[s]://domain[/name]]\n");

Modified: qpid/proton/trunk/proton-c/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/CMakeLists.txt?rev=1554940&r1=1554939&r2=1554940&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/CMakeLists.txt Thu Jan  2 22:20:21 2014
@@ -187,7 +187,7 @@ if (CMAKE_COMPILER_IS_GNUCC)
   if (ENABLE_WARNING_ERROR)
     set (WERROR "-Werror")
   endif (ENABLE_WARNING_ERROR)
-  set (COMPILE_WARNING_FLAGS "${WERROR} -Wall -pedantic-errors")
+  set (COMPILE_WARNING_FLAGS "${WERROR} -Wall -Wstrict-prototypes -pedantic-errors")
   if (NOT BUILD_WITH_CXX)
     set (COMPILE_LANGUAGE_FLAGS "-std=c99")
     set (COMPILE_PLATFORM_FLAGS "-std=gnu99")

Modified: qpid/proton/trunk/proton-c/include/proton/scanner.h
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/include/proton/scanner.h?rev=1554940&r1=1554939&r2=1554940&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/include/proton/scanner.h (original)
+++ qpid/proton/trunk/proton-c/include/proton/scanner.h Thu Jan  2 22:20:21 2014
@@ -63,7 +63,7 @@ typedef struct {
   size_t size;
 } pn_token_t;
 
-PN_EXTERN pn_scanner_t *pn_scanner();
+PN_EXTERN pn_scanner_t *pn_scanner(void);
 PN_EXTERN void pn_scanner_free(pn_scanner_t *scanner);
 PN_EXTERN pn_token_t pn_scanner_token(pn_scanner_t *scanner);
 PN_EXTERN int pn_scanner_err(pn_scanner_t *scanner, int code, const char *fmt, ...);

Modified: qpid/proton/trunk/proton-c/src/codec/decoder.h
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/codec/decoder.h?rev=1554940&r1=1554939&r2=1554940&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/codec/decoder.h (original)
+++ qpid/proton/trunk/proton-c/src/codec/decoder.h Thu Jan  2 22:20:21 2014
@@ -24,7 +24,7 @@
 
 typedef struct pn_decoder_t pn_decoder_t;
 
-pn_decoder_t *pn_decoder();
+pn_decoder_t *pn_decoder(void);
 ssize_t pn_decoder_decode(pn_decoder_t *decoder, const char *src, size_t size, pn_data_t
*dst);
 
 #endif /* decoder.h */

Modified: qpid/proton/trunk/proton-c/src/codec/encoder.h
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/codec/encoder.h?rev=1554940&r1=1554939&r2=1554940&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/codec/encoder.h (original)
+++ qpid/proton/trunk/proton-c/src/codec/encoder.h Thu Jan  2 22:20:21 2014
@@ -24,7 +24,7 @@
 
 typedef struct pn_encoder_t pn_encoder_t;
 
-pn_encoder_t *pn_encoder();
+pn_encoder_t *pn_encoder(void);
 ssize_t pn_encoder_encode(pn_encoder_t *encoder, pn_data_t *src, char *dst, size_t size);
 
 #endif /* encoder.h */

Modified: qpid/proton/trunk/proton-c/src/messenger/store.h
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/messenger/store.h?rev=1554940&r1=1554939&r2=1554940&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/messenger/store.h (original)
+++ qpid/proton/trunk/proton-c/src/messenger/store.h Thu Jan  2 22:20:21 2014
@@ -27,7 +27,7 @@
 typedef struct pni_store_t pni_store_t;
 typedef struct pni_entry_t pni_entry_t;
 
-pni_store_t *pni_store();
+pni_store_t *pni_store(void);
 void pni_store_free(pni_store_t *store);
 size_t pni_store_size(pni_store_t *store);
 pni_entry_t *pni_store_put(pni_store_t *store, const char *address);

Modified: qpid/proton/trunk/proton-c/src/messenger/transform.h
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/messenger/transform.h?rev=1554940&r1=1554939&r2=1554940&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/messenger/transform.h (original)
+++ qpid/proton/trunk/proton-c/src/messenger/transform.h Thu Jan  2 22:20:21 2014
@@ -26,7 +26,7 @@
 
 typedef struct pn_transform_t pn_transform_t;
 
-pn_transform_t *pn_transform();
+pn_transform_t *pn_transform(void);
 void pn_transform_rule(pn_transform_t *transform, const char *pattern,
                        const char *substitution);
 int pn_transform_apply(pn_transform_t *transform, const char *src,

Modified: qpid/proton/trunk/proton-c/src/posix/driver.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/posix/driver.c?rev=1554940&r1=1554939&r2=1554940&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/posix/driver.c (original)
+++ qpid/proton/trunk/proton-c/src/posix/driver.c Thu Jan  2 22:20:21 2014
@@ -52,7 +52,7 @@ static inline ssize_t pn_send(int sockfd
     return send(sockfd, buf, len, MSG_NOSIGNAL);
 }
 
-static inline int pn_create_socket() {
+static inline int pn_create_socket(void) {
     return socket(AF_INET, SOCK_STREAM, getprotobyname("tcp")->p_proto);
 }
 #elif defined(SO_NOSIGPIPE)
@@ -60,7 +60,7 @@ static inline ssize_t pn_send(int sockfd
     return send(sockfd, buf, len, 0);
 }
 
-static inline int pn_create_socket() {
+static inline int pn_create_socket(void) {
     int sock = socket(AF_INET, SOCK_STREAM, getprotobyname("tcp")->p_proto);
     if (sock == -1) return sock;
 

Modified: qpid/proton/trunk/proton-c/src/proton.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/proton.c?rev=1554940&r1=1554939&r2=1554940&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/proton.c (original)
+++ qpid/proton/trunk/proton-c/src/proton.c Thu Jan  2 22:20:21 2014
@@ -47,7 +47,7 @@ typedef struct {
 } heap_buffer;
 
 heap_buffer client_msg, client_data, server_data, server_iresp;
-void free_heap_buffers() {
+void free_heap_buffers(void) {
   free(client_msg.buf);
   free(client_data.buf);
   free(server_data.buf);

Modified: qpid/proton/trunk/proton-c/src/ssl/openssl.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/ssl/openssl.c?rev=1554940&r1=1554939&r2=1554940&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/ssl/openssl.c (original)
+++ qpid/proton/trunk/proton-c/src/ssl/openssl.c Thu Jan  2 22:20:21 2014
@@ -340,7 +340,7 @@ static int verify_callback(int preverify
 
 // this code was generated using the command:
 // "openssl dhparam -C -2 2048"
-static DH *get_dh2048()
+static DH *get_dh2048(void)
 {
   static unsigned char dh2048_p[]={
     0xAE,0xF7,0xE9,0x66,0x26,0x7A,0xAC,0x0A,0x6F,0x1E,0xCD,0x81,

Modified: qpid/proton/trunk/proton-c/src/tests/message.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/tests/message.c?rev=1554940&r1=1554939&r2=1554940&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/tests/message.c (original)
+++ qpid/proton/trunk/proton-c/src/tests/message.c Thu Jan  2 22:20:21 2014
@@ -28,7 +28,7 @@
 
 #define assert(E) ((E) ? 0 : (abort(), 0))
 
-static void test_overflow_error()
+static void test_overflow_error(void)
 {
   pn_message_t *message = pn_message();
   char buf[8];

Modified: qpid/proton/trunk/proton-c/src/tests/object.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/tests/object.c?rev=1554940&r1=1554939&r2=1554940&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/tests/object.c (original)
+++ qpid/proton/trunk/proton-c/src/tests/object.c Thu Jan  2 22:20:21 2014
@@ -117,7 +117,7 @@ static void finalizer(void *object)
   (**called)++;
 }
 
-static void test_finalize()
+static void test_finalize(void)
 {
   static pn_class_t clazz = {NULL, finalizer};
 
@@ -131,7 +131,7 @@ static void test_finalize()
   assert(called == 1);
 }
 
-static void test_free()
+static void test_free(void)
 {
   // just to make sure it doesn't seg fault or anything
   pn_free(NULL);
@@ -139,7 +139,7 @@ static void test_free()
 
 static uintptr_t hashcode(void *obj) { return (uintptr_t) obj; }
 
-static void test_hashcode()
+static void test_hashcode(void)
 {
   static pn_class_t clazz = {NULL, NULL, hashcode};
   void *obj = pn_new(0, &clazz);
@@ -149,7 +149,7 @@ static void test_hashcode()
   pn_free(obj);
 }
 
-static void test_compare()
+static void test_compare(void)
 {
   static pn_class_t clazz = {NULL, NULL, NULL, delta};
 
@@ -279,7 +279,7 @@ static void check_list_index(pn_list_t *
   assert(pn_list_index(list, value) == idx);
 }
 
-static void test_list_index()
+static void test_list_index(void)
 {
   pn_list_t *l = pn_list(0, 0);
   void *one = pn_string("one");
@@ -322,7 +322,7 @@ static bool pn_strequals(const char *a, 
   return !strcmp(a, b);
 }
 
-static void test_build_list()
+static void test_build_list(void)
 {
   pn_list_t *l = build_list(0, PN_REFCOUNT,
                             pn_string("one"),
@@ -342,7 +342,7 @@ static void test_build_list()
   pn_free(l);
 }
 
-static void test_build_map()
+static void test_build_map(void)
 {
   pn_map_t *m = build_map(0, 0.75, PN_REFCOUNT,
                           pn_string("key"),
@@ -366,7 +366,7 @@ static void test_build_map()
   pn_free(key);
 }
 
-static void test_build_map_odd()
+static void test_build_map_odd(void)
 {
   pn_map_t *m = build_map(0, 0.75, PN_REFCOUNT,
                           pn_string("key"),
@@ -393,7 +393,7 @@ static void test_build_map_odd()
   pn_free(key);
 }
 
-static void test_map()
+static void test_map(void)
 {
   void *one = pn_new(0, NULL);
   void *two = pn_new(0, NULL);
@@ -456,7 +456,7 @@ static void test_map()
   pn_decref(map);
 }
 
-static void test_hash()
+static void test_hash(void)
 {
   void *one = pn_new(0, NULL);
   void *two = pn_new(0, NULL);
@@ -567,7 +567,7 @@ static void test_stringn(const char *val
   pn_free(strsetn);
 }
 
-static void test_string_format()
+static void test_string_format(void)
 {
   pn_string_t *str = pn_string("");
   assert(str);
@@ -579,7 +579,7 @@ static void test_string_format()
   pn_free(str);
 }
 
-static void test_string_addf()
+static void test_string_addf(void)
 {
   pn_string_t *str = pn_string("hello ");
   assert(str);
@@ -638,7 +638,7 @@ void test_inspect(void *o, const char *e
   pn_free(dst);
 }
 
-void test_list_inspect()
+void test_list_inspect(void)
 {
   pn_list_t *l = build_list(0, PN_REFCOUNT, END);
   test_inspect(l, "[]");
@@ -664,7 +664,7 @@ void test_list_inspect()
   pn_free(l);
 }
 
-void test_map_inspect()
+void test_map_inspect(void)
 {
   // note that when there is more than one entry in a map, the order
   // of the entries is dependent on the hashes involved, it will be
@@ -695,7 +695,7 @@ void test_map_inspect()
   pn_free(m);
 }
 
-void test_list_compare()
+void test_list_compare(void)
 {
   pn_list_t *a = pn_list(0, PN_REFCOUNT);
   pn_list_t *b = pn_list(0, PN_REFCOUNT);

Modified: qpid/proton/trunk/tests/tools/apps/c/msgr-common.h
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/tests/tools/apps/c/msgr-common.h?rev=1554940&r1=1554939&r2=1554940&view=diff
==============================================================================
--- qpid/proton/trunk/tests/tools/apps/c/msgr-common.h (original)
+++ qpid/proton/trunk/tests/tools/apps/c/msgr-common.h Thu Jan  2 22:20:21 2014
@@ -46,7 +46,7 @@
 
 void msgr_die(const char *file, int line, const char *message);
 char *msgr_strdup( const char *src );
-pn_timestamp_t msgr_now();
+pn_timestamp_t msgr_now(void);
 void parse_password( const char *, char ** );
 
 #define check_messenger(m)  \
@@ -84,6 +84,6 @@ void statistics_start( Statistics_t *s )
 void statistics_msg_received( Statistics_t *s, pn_message_t *message );
 void statistics_report( Statistics_t *s, uint64_t sent, uint64_t received );
 
-void enable_logging();
+void enable_logging(void);
 void LOG( const char *fmt, ... );
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message