linphone-developers
[Top][All Lists]
Advanced

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

[Linphone-developers] patches for various compile errors w/ gcc 4.3.2


From: Nick Briggs
Subject: [Linphone-developers] patches for various compile errors w/ gcc 4.3.2
Date: Thu, 20 Nov 2008 10:52:16 PST
User-agent: Thunderbird 2.0.0.12 (X11/20080326)

Would someone with commit privileges mind applying these patches (diffs against the SVN head of a few days ago) to the linphone tree?

They fix the compilation warnings/errors caused by using printf variants where the format string is not a constant.

Thanks --

Nick Briggs
PARC

Index: oRTP/src/tests/tevrtpsend.c
===================================================================
--- oRTP/src/tests/tevrtpsend.c (revision 176)
+++ oRTP/src/tests/tevrtpsend.c (working copy)
@@ -49,7 +49,7 @@
        int tel=0;
        
        if (argc<4){
-               printf(help);
+               printf("%s",help);
                return -1;
        }
        
Index: oRTP/src/tests/rtpsend.c
===================================================================
--- oRTP/src/tests/rtpsend.c    (revision 176)
+++ oRTP/src/tests/rtpsend.c    (working copy)
@@ -47,14 +47,14 @@
        int clockslide=0;
        int jitter=0;
        if (argc<4){
-               printf(help);
+               printf("%s", help);
                return -1;
        }
        for(i=4;i<argc;i++){
                if (strcmp(argv[i],"--with-clockslide")==0){
                        i++;
                        if (i>=argc) {
-                               printf(help);
+                               printf("%s", help);
                                return -1;
                        }
                        clockslide=atoi(argv[i]);
@@ -63,7 +63,7 @@
                        ortp_message("Jitter will be added to outgoing 
stream.");
                        i++;
                        if (i>=argc) {
-                               printf(help);
+                               printf("%s", help);
                                return -1;
                        }
                        jitter=atoi(argv[i]);
Index: oRTP/src/tests/tevmrtprecv.c
===================================================================
--- oRTP/src/tests/tevmrtprecv.c        (revision 176)
+++ oRTP/src/tests/tevmrtprecv.c        (working copy)
@@ -97,13 +97,13 @@
        char *filename;
 
        if (argc<4){
-               printf(help);
+               printf("%s",help);
                return -1;
        }
        
        channels=atoi(argv[3]);
        if (channels==0){
-               printf(help);
+               printf("%s",help);
                return -1;
        }
        
Index: oRTP/src/tests/mrtprecv.c
===================================================================
--- oRTP/src/tests/mrtprecv.c   (revision 176)
+++ oRTP/src/tests/mrtprecv.c   (working copy)
@@ -82,13 +82,13 @@
        char *filename;
        
        if (argc<4){
-               printf(help);
+               printf("%s",help);
                return -1;
        }
        
        channels=atoi(argv[3]);
        if (channels==0){
-               printf(help);
+               printf("%s",help);
                return -1;
        }
        
Index: oRTP/src/tests/rtpmemtest.c
===================================================================
--- oRTP/src/tests/rtpmemtest.c (revision 176)
+++ oRTP/src/tests/rtpmemtest.c (working copy)
@@ -85,13 +85,13 @@
        argv[3]="100";
 
        if (argc<4){
-               printf(help);
+               printf("%s",help);
                return -1;
        }
 
        channels=atoi(argv[3]);
        if (channels==0){
-               printf(help);
+               printf("%s",help);
                return -1;
        }
 
Index: oRTP/src/tests/tevrtprecv.c
===================================================================
--- oRTP/src/tests/tevrtprecv.c (revision 176)
+++ oRTP/src/tests/tevrtprecv.c (working copy)
@@ -60,7 +60,7 @@
        int have_more;
 
        if (argc<3){
-               printf(help);
+               printf("%s",help);
                return -1;
        }
 
Index: oRTP/src/tests/rtprecv.c
===================================================================
--- oRTP/src/tests/rtprecv.c    (revision 176)
+++ oRTP/src/tests/rtprecv.c    (working copy)
@@ -90,12 +90,12 @@
        
        /* init the lib */
        if (argc<3){
-               printf(help);
+               printf("%s",help);
                return -1;
        }
        local_port=atoi(argv[2]);
        if (local_port<=0) {
-               printf(help);
+               printf("%s",help);
                return -1;
        }
        for (i=3;i<argc;i++)
Index: oRTP/src/tests/rtpsend_stupid.c
===================================================================
--- oRTP/src/tests/rtpsend_stupid.c     (revision 176)
+++ oRTP/src/tests/rtpsend_stupid.c     (working copy)
@@ -50,14 +50,14 @@
        int clockslide=0;
        int jitter=0;
        if (argc<4){
-               printf(help);
+               printf("%s",help);
                return -1;
        }
        for(i=4;i<argc;i++){
                if (strcmp(argv[i],"--with-clockslide")==0){
                        i++;
                        if (i>=argc) {
-                               printf(help);
+                               printf("%s",help);
                                return -1;
                        }
                        clockslide=atoi(argv[i]);
@@ -66,7 +66,7 @@
                        ortp_message("Ptime related jitter will be added to 
outgoing stream.");
                        i++;
                        if (i>=argc) {
-                               printf(help);
+                               printf("%s",help);
                                return -1;
                        }
                        jitter=atoi(argv[i]);
Index: oRTP/src/tests/mrtpsend.c
===================================================================
--- oRTP/src/tests/mrtpsend.c   (revision 176)
+++ oRTP/src/tests/mrtpsend.c   (working copy)
@@ -59,13 +59,13 @@
        SessionSet *set;
        
        if (argc<5){
-               printf(help);
+               printf("%s",help);
                return -1;
        }
        
        channels=atoi(argv[4]);
        if (channels==0){
-               printf(help);
+               printf("%s",help);
                return -1;
        }
        
@@ -78,7 +78,7 @@
                                packet_size=atoi(argv[i+1]);
                        }
                        else {
-                               printf(help);
+                               printf("%s",help);
                                return -1;
                        }
                        if (packet_size==0) {
@@ -94,7 +94,7 @@
                                ts_inc=atoi(argv[i+1]);
                        }
                        else {
-                               printf(help);
+                               printf("%s",help);
                                return -1;
                        }
                        if (ts_inc==0) {
Index: gtk-glade/main.c
===================================================================
--- gtk-glade/main.c    (revision 176)
+++ gtk-glade/main.c    (working copy)
@@ -187,6 +187,7 @@
                                 GTK_DIALOG_DESTROY_WITH_PARENT,
                                GTK_MESSAGE_QUESTION,
                                 GTK_BUTTONS_YES_NO,
+                                "%s",
                                (const gchar*)message);
                /* connect to some callback : REVISIT */
                /*
@@ -203,6 +204,7 @@
                                   GTK_DIALOG_DESTROY_WITH_PARENT,
                                   type,
                                   GTK_BUTTONS_CLOSE,
+                                  "%s",
                                   (const gchar*)message);
                /* Destroy the dialog when the user responds to it (e.g. clicks 
a button) */
                g_signal_connect_swapped (G_OBJECT (dialog), "response",
@@ -441,6 +443,7 @@
                                 GTK_DIALOG_DESTROY_WITH_PARENT,
                                GTK_MESSAGE_QUESTION,
                                 GTK_BUTTONS_YES_NO,
+                                "%s",
                                message);
        g_free(message);
        g_signal_connect(G_OBJECT (dialog), "response",
Index: console/linphonec.c
===================================================================
--- console/linphonec.c (revision 176)
+++ console/linphonec.c (working copy)
@@ -364,7 +364,7 @@
                start_prompt_reader();
                prompt_reader_started=TRUE;
        }
-       fprintf(stdout,prompt);
+       fprintf(stdout,"%s",prompt);
        fflush(stdout);
        while(1){
                ms_mutex_lock(&prompt_mutex);
@@ -836,7 +836,7 @@
                                         argv[arg_num]);
                                exit(EXIT_FAILURE);
                        }
-                       snprintf(configfile_name, PATH_MAX, argv[arg_num]);
+                       snprintf(configfile_name, PATH_MAX, "%s", 
argv[arg_num]);
                }
                else if (strncmp ("-s", argv[arg_num], 2) == 0)
                {
@@ -988,7 +988,7 @@
        {
                snprintf(message, 255, "Can't open %s for reading: %s\n",
                        from, strerror(errno));
-               fprintf(stderr, message);
+               fprintf(stderr, "%s", message);
                return 0;
        }
 
@@ -998,7 +998,7 @@
        {
                snprintf(message, 255, "Can't open %s for writing: %s\n",
                        to, strerror(errno));
-               fprintf(stderr, message);
+               fprintf(stderr, "%s", message);
                return 0;
        }
 

reply via email to

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