Hi,

I have problems with building linphone-3.4.3 and 
mediastreamer-2.7.3 with --enable-strict option.
There are some errors with unused variables
and returned value.

In attachment my patches that fixes build for me.

-- 
Alexey Kurov <[email protected]>
--- linphone-3.4.3/coreapi/linphonecore.c	2011-03-28 21:35:36.000000000 +0300
+++ linphone-3.4.3/coreapi/linphonecore.c	2011-09-02 14:00:57.348939880 +0300
@@ -746,7 +746,7 @@ static void codecs_config_read(LinphoneC
 }
 
 static void video_config_read(LinphoneCore *lc){
-	int capture, display, self_view;
+	__attribute__((__unused__)) int capture, display, self_view;
 	int enabled;
 	const char *str;
 	int ndev;

--- mediastreamer-2.7.3/src/ice.c	2010-08-26 04:21:55.000000000 -0600
+++ mediastreamer-2.7.3/src/ice.c	2011-09-05 04:12:10.816032769 -0600
@@ -480,7 +480,7 @@ static int ice_process_stun_message(RtpS
 	struct CandidatePair *remote_candidates = NULL;
 	StunMessage msg;
 	bool_t res;
-	int highest_priority_success=-1;
+	__attribute__((__unused__)) int highest_priority_success=-1;
 	OrtpEventData *evt_data = ortp_event_get_data(evt);
 	mblk_t *mp = evt_data->packet;
 	struct sockaddr_in *udp_remote;
--- mediastreamer-2.7.3/src/jpegwriter.c	2011-02-11 03:24:22.000000000 -0700
+++ mediastreamer-2.7.3/src/jpegwriter.c	2011-09-05 04:32:15.947539459 -0600
@@ -123,7 +123,7 @@ static void jpg_process(MSFilter *f){
 			if (error<0){
 				ms_error("Could not encode jpeg picture.");
 			}else{
-				fwrite(comp_buf,error,1,s->file);
+				if(fwrite(comp_buf,error,1,s->file)) {};
 				ms_message("Snapshot done");
 			}
 			cleanup(s,avctx);
--- mediastreamer-2.7.3/src/msconf.c	2010-08-26 04:21:55.000000000 -0600
+++ mediastreamer-2.7.3/src/msconf.c	2011-09-05 04:12:10.839031122 -0600
@@ -416,7 +416,7 @@ static void conf_sum(MSFilter *f, ConfSt
 #ifndef DISABLE_SPEEX
 			if (chan->speex_pp!=NULL && s->enable_vad==TRUE && i==0)
 			{
-				int vad;
+				__attribute__((__unused__)) int vad;
 				vad = speex_preprocess(chan->speex_pp, (short*)chan->input, NULL);
 				ms_filter_notify(f, MS_CONF_SPEEX_PREPROCESS_MIC, (void*)chan->speex_pp);
 
@@ -447,7 +447,7 @@ static void conf_sum(MSFilter *f, ConfSt
 			}
 			else if (chan->speex_pp!=NULL && s->enable_vad==TRUE)
 			{
-				int vad;
+				__attribute__((__unused__)) int vad;
 
 				if (s->enable_halfduplex>0)
 				{
--- mediastreamer-2.7.3/src/msjoin.c	2010-08-26 04:21:55.000000000 -0600
+++ mediastreamer-2.7.3/src/msjoin.c	2011-09-05 04:12:10.843030716 -0600
@@ -30,7 +30,7 @@ static void join_process(MSFilter *f){
 	if (f->inputs[1]!=NULL)
 	{
 		while((im=ms_queue_get(f->inputs[1]))!=NULL){
-			int payload;
+			__attribute__((__unused__)) int payload;
 			payload=mblk_set_payload_type(im, 123);
 			ms_queue_put(f->outputs[0],im);
 		}
--- mediastreamer-2.7.3/src/mtu.c	2010-08-26 07:14:08.000000000 -0600
+++ mediastreamer-2.7.3/src/mtu.c	2011-09-05 04:12:10.847030359 -0600
@@ -208,7 +208,7 @@ int ms_discover_mtu(const char *host){
 	}
 	mtu=1500-28;//was the size of the inital buf
 	do{
-		int send_returned;
+		__attribute__((__unused__)) int send_returned;
 		char *buf=ms_malloc0(mtu);//avoid mtu greater than the beginning
 		if(buf == NULL)
 		{
--- mediastreamer-2.7.3/src/videodec.c	2011-01-23 14:09:59.000000000 -0700
+++ mediastreamer-2.7.3/src/videodec.c	2011-09-05 04:12:34.445092291 -0600
@@ -189,7 +189,7 @@ static mblk_t * skip_rfc2429_header(mblk
 		uint32_t *p = (uint32_t*)inm->b_rptr;
 		uint8_t *ph=inm->b_rptr;
 		int PLEN;
-		int gob_num;
+		__attribute__((__unused__)) int gob_num;
 		bool_t P;
 		
 		P=rfc2429_get_P(ph);

_______________________________________________
Linphone-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/linphone-users

Reply via email to