qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cliffjan...@apache.org
Subject svn commit: r1441856 - in /qpid/proton/trunk/proton-c: ./ examples/messenger/c/ include/proton/ src/ src/dispatcher/ src/ssl/
Date Sun, 03 Feb 2013 04:32:55 GMT
Author: cliffjansen
Date: Sun Feb  3 04:32:54 2013
New Revision: 1441856

URL: http://svn.apache.org/viewvc?rev=1441856&view=rev
Log:
PROTON-159: C++ support part 2.  See https://reviews.apache.org/r/9085/

Modified:
    qpid/proton/trunk/proton-c/CMakeLists.txt
    qpid/proton/trunk/proton-c/examples/messenger/c/recv.c
    qpid/proton/trunk/proton-c/examples/messenger/c/send.c
    qpid/proton/trunk/proton-c/include/proton/util.h
    qpid/proton/trunk/proton-c/src/dispatcher/dispatcher.c
    qpid/proton/trunk/proton-c/src/dispatcher/dispatcher.h
    qpid/proton/trunk/proton-c/src/messenger.c
    qpid/proton/trunk/proton-c/src/proton.c
    qpid/proton/trunk/proton-c/src/ssl/openssl.c
    qpid/proton/trunk/proton-c/src/util.c

Modified: qpid/proton/trunk/proton-c/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/CMakeLists.txt?rev=1441856&r1=1441855&r2=1441856&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/CMakeLists.txt Sun Feb  3 04:32:54 2013
@@ -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 -Wc++-compat")
+  set (COMPILE_WARNING_FLAGS "${WERROR} -Wall -pedantic-errors -Wc++-compat -Wwrite-strings")
   set (COMPILE_LANGUAGE_FLAGS "-std=c99")
   set (COMPILE_PLATFORM_FLAGS "-std=gnu99")
   if (ENABLE_UNDEFINED_ERROR)

Modified: qpid/proton/trunk/proton-c/examples/messenger/c/recv.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/examples/messenger/c/recv.c?rev=1441856&r1=1441855&r2=1441856&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/examples/messenger/c/recv.c (original)
+++ qpid/proton/trunk/proton-c/examples/messenger/c/recv.c Sun Feb  3 04:32:54 2013
@@ -55,7 +55,7 @@ int main(int argc, char** argv)
   char* certificate = NULL;
   char* privatekey = NULL;
   char* password = NULL;
-  char* address = "amqp://~0.0.0.0";
+  char* address = (char *) "amqp://~0.0.0.0";
   int c;
   opterr = 0;
 

Modified: qpid/proton/trunk/proton-c/examples/messenger/c/send.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/examples/messenger/c/send.c?rev=1441856&r1=1441855&r2=1441856&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/examples/messenger/c/send.c (original)
+++ qpid/proton/trunk/proton-c/examples/messenger/c/send.c Sun Feb  3 04:32:54 2013
@@ -53,8 +53,8 @@ int main(int argc, char** argv)
 {
   int c;
   opterr = 0;
-  char * address = "amqp://0.0.0.0";
-  char * msgtext = "Hello World!";
+  char * address = (char *) "amqp://0.0.0.0";
+  char * msgtext = (char *) "Hello World!";
 
   while((c = getopt(argc, argv, "ha:b:c:")) != -1)
   {

Modified: qpid/proton/trunk/proton-c/include/proton/util.h
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/include/proton/util.h?rev=1441856&r1=1441855&r2=1441856&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/include/proton/util.h (original)
+++ qpid/proton/trunk/proton-c/include/proton/util.h Sun Feb  3 04:32:54 2013
@@ -29,8 +29,8 @@ extern "C" {
 #endif
 
 void parse_url(char *url, char **scheme, char **user, char **pass, char **host, char **port,
char **path);
-void pn_fatal(char *fmt, ...);
-void pn_vfatal(char *fmt, va_list ap);
+void pn_fatal(const char *fmt, ...);
+void pn_vfatal(const char *fmt, va_list ap);
 
 #ifdef __cplusplus
 }

Modified: qpid/proton/trunk/proton-c/src/dispatcher/dispatcher.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/dispatcher/dispatcher.c?rev=1441856&r1=1441855&r2=1441856&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/dispatcher/dispatcher.c (original)
+++ qpid/proton/trunk/proton-c/src/dispatcher/dispatcher.c Sun Feb  3 04:32:54 2013
@@ -103,7 +103,7 @@ static void pn_do_trace(pn_dispatcher_t 
   }
 }
 
-void pn_dispatcher_trace(pn_dispatcher_t *disp, uint16_t ch, char *fmt, ...)
+void pn_dispatcher_trace(pn_dispatcher_t *disp, uint16_t ch, const char *fmt, ...)
 {
   va_list ap;
   fprintf(stderr, "[%p:%u] ", (void *) disp, ch);

Modified: qpid/proton/trunk/proton-c/src/dispatcher/dispatcher.h
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/dispatcher/dispatcher.h?rev=1441856&r1=1441855&r2=1441856&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/dispatcher/dispatcher.h (original)
+++ qpid/proton/trunk/proton-c/src/dispatcher/dispatcher.h Sun Feb  3 04:32:54 2013
@@ -71,7 +71,7 @@ void pn_set_payload(pn_dispatcher_t *dis
 int pn_post_frame(pn_dispatcher_t *disp, uint16_t ch, const char *fmt, ...);
 ssize_t pn_dispatcher_input(pn_dispatcher_t *disp, const char *bytes, size_t available);
 ssize_t pn_dispatcher_output(pn_dispatcher_t *disp, char *bytes, size_t size);
-void pn_dispatcher_trace(pn_dispatcher_t *disp, uint16_t ch, char *fmt, ...);
+void pn_dispatcher_trace(pn_dispatcher_t *disp, uint16_t ch, const char *fmt, ...);
 int pn_post_transfer_frame(pn_dispatcher_t *disp,
                            uint16_t local_channel,
                            uint32_t handle,

Modified: qpid/proton/trunk/proton-c/src/messenger.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/messenger.c?rev=1441856&r1=1441855&r2=1441856&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/messenger.c (original)
+++ qpid/proton/trunk/proton-c/src/messenger.c Sun Feb  3 04:32:54 2013
@@ -714,7 +714,7 @@ pn_connection_t *pn_messenger_resolve(pn
   char *scheme = NULL;
   char *user = NULL;
   char *pass = NULL;
-  char *host = "0.0.0.0";
+  char *host = (char *) "0.0.0.0";
   char *port = NULL;
   parse_url(address, &scheme, &user, &pass, &host, &port, name);
 
@@ -836,7 +836,7 @@ pn_subscription_t *pn_messenger_subscrib
   char *scheme = NULL;
   char *user = NULL;
   char *pass = NULL;
-  char *host = "0.0.0.0";
+  char *host = (char *) "0.0.0.0";
   char *port = NULL;
   char *path = NULL;
 

Modified: qpid/proton/trunk/proton-c/src/proton.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/proton.c?rev=1441856&r1=1441855&r2=1441856&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/proton.c (original)
+++ qpid/proton/trunk/proton-c/src/proton.c Sun Feb  3 04:32:54 2013
@@ -386,8 +386,8 @@ void client_callback(pn_connector_t *cto
 int main(int argc, char **argv)
 {
   char *url = NULL;
-  char *address = "queue";
-  char *mechanism = "ANONYMOUS";
+  char *address = (char *) "queue";
+  char *mechanism = (char *) "ANONYMOUS";
   int count = 1;
   bool quiet = false;
   int high = 100;
@@ -450,8 +450,8 @@ int main(int argc, char **argv)
   char *scheme = NULL;
   char *user = NULL;
   char *pass = NULL;
-  char *host = "0.0.0.0";
-  char *port = "5672";
+  char *host = (char *) "0.0.0.0";
+  char *port = (char *) "5672";
   char *path = NULL;
 
   parse_url(url, &scheme, &user, &pass, &host, &port, &path);

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=1441856&r1=1441855&r2=1441856&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/ssl/openssl.c (original)
+++ qpid/proton/trunk/proton-c/src/ssl/openssl.c Sun Feb  3 04:32:54 2013
@@ -415,7 +415,7 @@ pn_ssl_domain_t *pn_ssl_domain( pn_ssl_m
     SSL_library_init();
     SSL_load_error_strings();
     OpenSSL_add_all_algorithms();
-    ssl_ex_data_index = SSL_get_ex_new_index( 0, "org.apache.qpid.proton.ssl",
+    ssl_ex_data_index = SSL_get_ex_new_index( 0, (void *) "org.apache.qpid.proton.ssl",
                                               NULL, NULL, NULL);
   }
 

Modified: qpid/proton/trunk/proton-c/src/util.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/util.c?rev=1441856&r1=1441855&r2=1441856&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/util.c (original)
+++ qpid/proton/trunk/proton-c/src/util.c Sun Feb  3 04:32:54 2013
@@ -118,13 +118,13 @@ void parse_url(char *url, char **scheme,
   }
 }
 
-void pn_vfatal(char *fmt, va_list ap)
+void pn_vfatal(const char *fmt, va_list ap)
 {
   vfprintf(stderr, fmt, ap);
   abort();
 }
 
-void pn_fatal(char *fmt, ...)
+void pn_fatal(const char *fmt, ...)
 {
   va_list ap;
   va_start(ap, fmt);



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


Mime
View raw message