[linux-dvb] [patch 1/3] fix gcc warnings

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

 



Index: dvb-apps/lib/libdvben50221/asn_1.c
===================================================================
--- dvb-apps.orig/lib/libdvben50221/asn_1.c
+++ dvb-apps/lib/libdvben50221/asn_1.c
@@ -61,7 +61,7 @@ uint8_t *asn_1_encode(uint16_t length, u
 
 		while (temp) {
 			temp = temp >> 8;
-			*asn_1_words++;
+			(*asn_1_words)++;
 		}
 		if ((asn_1_array = (uint8_t *) malloc(*asn_1_words * sizeof (uint8_t))) == NULL) {
 			printf("%s: Memory allocation failed.\n", __FUNCTION__);
@@ -70,7 +70,7 @@ uint8_t *asn_1_encode(uint16_t length, u
 		printf("%s: Allocated %d bytes.\n", __FUNCTION__, *asn_1_words);
 
 		while (length) {
-			asn_1_array[*asn_1_words--] = length & 0xff;
+			asn_1_array[(*asn_1_words)--] = length & 0xff;
 			length = length >> 8;
 		}
 		return asn_1_array;
Index: dvb-apps/lib/libdvben50221/en50221_encode.c
===================================================================
--- dvb-apps.orig/lib/libdvben50221/en50221_encode.c
+++ dvb-apps/lib/libdvben50221/en50221_encode.c
@@ -46,7 +46,7 @@ uint16_t en50221_encode_header(struct ca
 uint16_t en50221_encode_descriptor(struct ca_msg * ca_msg,
 		                   struct ca_descriptor * desc, uint16_t pos)
 {
-	uint8_t i;
+	uint8_t i = 0;
 	uint16_t temp = 0, private_bytes = 0;
 	temp = pos;
 
Index: dvb-apps/libs/libdvb2/notifier.c
===================================================================
--- dvb-apps.orig/libs/libdvb2/notifier.c
+++ dvb-apps/libs/libdvb2/notifier.c
@@ -86,15 +86,14 @@ int dvb_revents(struct dvb * dvb, const 
  */
 int dvb_revent(struct dvb * dvb, int fd, short revents)
 {
-	struct dvb_notifier * notifier;
 	int i;
 
 	if (revents == 0)
 		return 0;
 
 	for (i = 0; i <= dvb->nb_notifiers; ++i) {
-		if (dvb->notifiers.ptrs[i] == NULL ||
-		    dvb->pollfds[i].fd != fd)
+		struct dvb_notifier * notifier = dvb->notifiers.ptrs[i];
+		if (notifier == NULL || dvb->pollfds[i].fd != fd)
 			continue;
 
 		dvb->pollfds[i].revents = revents;
Index: dvb-apps/libs/libsi2/section_buf.c
===================================================================
--- dvb-apps.orig/libs/libsi2/section_buf.c
+++ dvb-apps/libs/libsi2/section_buf.c
@@ -103,7 +103,7 @@ int section_buf_add_transport_payload(st
 				      uint8_t* payload, int len,
 				      int pdu_start)
 {
-	int used;
+	int used = 0;
 	int tmp;
 
 	/* sanity catch */
Index: dvb-apps/test/test_av.c
===================================================================
--- dvb-apps.orig/test/test_av.c
+++ dvb-apps/test/test_av.c
@@ -429,7 +429,7 @@ int videoStillPicture(int fd, char *arg)
 		return 0;
 	}
 
-	printf("read: %d bytes\n",read(sifd,sp.iFrame,sp.size));
+	printf("read: %zd bytes\n",read(sifd,sp.iFrame,sp.size));
 	if (ioctl(fd, VIDEO_STILLPICTURE, &sp) == -1)
 		perror("VIDEO_STILLPICTURE");
 	return 0;
Index: dvb-apps/test/test_stillimage.c
===================================================================
--- dvb-apps.orig/test/test_stillimage.c
+++ dvb-apps/test/test_stillimage.c
@@ -82,7 +82,7 @@ next_pic:
 		return -1;
 	}
 
-	printf ("read: %d bytes\n", read(filefd, sp.iFrame, sp.size));
+	printf ("read: %zd bytes\n", read(filefd, sp.iFrame, sp.size));
 	close(filefd);
 
 	if ((ioctl(fd, VIDEO_STILLPICTURE, &sp) < 0)) {
Index: dvb-apps/util/scan/diseqc.c
===================================================================
--- dvb-apps.orig/util/scan/diseqc.c
+++ dvb-apps/util/scan/diseqc.c
@@ -37,9 +37,6 @@ void msleep(uint32_t msec)
 		;
 }
 
-#define printf(x...)
-
-
 int diseqc_send_msg (int fd, fe_sec_voltage_t v, struct diseqc_cmd **cmd,
 		     fe_sec_tone_mode_t t, fe_sec_mini_cmd_t b)
 {

--
 (o_   Ludwig Nussel
 //\   SUSE LINUX Products GmbH, Development
 V_/_  http://www.suse.de/


[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux