Blame SOURCES/cdrkit-1.1.8-werror.patch

8c1a2e
diff -up cdrkit-1.1.8/wodim/wodim.c.werror cdrkit-1.1.8/wodim/wodim.c
8c1a2e
--- cdrkit-1.1.8/wodim/wodim.c.werror	2008-05-27 15:34:03.000000000 +0200
8c1a2e
+++ cdrkit-1.1.8/wodim/wodim.c	2008-05-27 15:36:22.000000000 +0200
8c1a2e
@@ -4089,7 +4089,7 @@ audioread(SCSI *usalp, cdr_t *dp, int fl
8c1a2e
 
8c1a2e
 	read_scsi(usalp, buf, 1000, 1);
8c1a2e
 	printf("XXX:\n");
8c1a2e
-	write(1, buf, 512); /* FIXME: handle return value */
8c1a2e
+	do{int ret;ret=write(1, buf, 512);}while(0); /* FIXME: handle return value */
8c1a2e
 	unload_media(usalp, dp, flags);
8c1a2e
 	comexit(0);
8c1a2e
 #endif
8c1a2e
diff -up cdrkit-1.1.8/wodim/isosize.c.werror cdrkit-1.1.8/wodim/isosize.c
8c1a2e
--- cdrkit-1.1.8/wodim/isosize.c.werror	2008-05-27 15:41:36.000000000 +0200
8c1a2e
+++ cdrkit-1.1.8/wodim/isosize.c	2008-05-27 15:42:12.000000000 +0200
8c1a2e
@@ -69,7 +69,7 @@ isosize(int f)
8c1a2e
 	vp = (struct iso9660_pr_voldesc *) &vd;
8c1a2e
 
8c1a2e
 	do {
8c1a2e
-		read(f, &vd, sizeof (vd)); /* FIXME: check return value */
8c1a2e
+		do{int ret;ret=read(f, &vd, sizeof (vd));}while(0); /* FIXME: check return value */
8c1a2e
 		if (GET_UBYTE(vd.vd_type) == VD_PRIMARY)
8c1a2e
 			break;
8c1a2e
 
8c1a2e
diff -up cdrkit-1.1.8/icedax/toc.c.werror cdrkit-1.1.8/icedax/toc.c
8c1a2e
--- cdrkit-1.1.8/icedax/toc.c.werror	2008-05-27 15:34:03.000000000 +0200
8c1a2e
+++ cdrkit-1.1.8/icedax/toc.c	2008-05-27 15:41:11.000000000 +0200
8c1a2e
@@ -1071,7 +1071,7 @@ static int handle_userchoice(char *p, un
8c1a2e
 	/* get user response. */
8c1a2e
 	do {
8c1a2e
 		fprintf(stderr, "please choose one (0-%u): ", nr);
8c1a2e
-		scanf("%u", &user_choice); /* FIXME: check return value */
8c1a2e
+		do{int ret;ret=scanf("%u", &user_choice);}while(0); /* FIXME: check return value */
8c1a2e
 	} while (user_choice > nr);
8c1a2e
 
8c1a2e
 	if (user_choice == nr)
8c1a2e
diff -up cdrkit-1.1.8/genisoimage/diag/dump.c.werror cdrkit-1.1.8/genisoimage/diag/dump.c
8c1a2e
--- cdrkit-1.1.8/genisoimage/diag/dump.c.werror	2008-05-27 15:34:03.000000000 +0200
8c1a2e
+++ cdrkit-1.1.8/genisoimage/diag/dump.c	2008-05-27 15:34:03.000000000 +0200
8c1a2e
@@ -368,7 +368,7 @@ main(int argc, char *argv[])
8c1a2e
 	do {
8c1a2e
 		if (file_addr < (off_t)0) file_addr = (off_t)0;
8c1a2e
 		showblock(1);
8c1a2e
-		read(STDIN_FILENO, &c, 1); /* FIXME: check return value */
8c1a2e
+		do{int ret;ret=read(STDIN_FILENO, &c, 1);}while(0); /* FIXME: check return value */
8c1a2e
 		if (c == 'a')
8c1a2e
 			file_addr -= PAGE;
8c1a2e
 		if (c == 'b')
8c1a2e
@@ -378,11 +378,11 @@ main(int argc, char *argv[])
8c1a2e
 			printf("Enter new starting block (in hex):");
8c1a2e
 			if (sizeof (file_addr) > sizeof (long)) {
8c1a2e
 				Llong	ll;
8c1a2e
-				scanf("%llx", &ll); /* FIXME: check return value */
8c1a2e
+				do{int ret;ret=scanf("%llx", &ll);}while(0); /* FIXME: check return value */
8c1a2e
 				file_addr = (off_t)ll;
8c1a2e
 			} else {
8c1a2e
 				long	l;
8c1a2e
-				scanf("%lx", &l); /* FIXME: check return value */
8c1a2e
+				do{int ret;ret=scanf("%lx", &l);}while(0); /* FIXME: check return value */
8c1a2e
 				file_addr = (off_t)l;
8c1a2e
 			}
8c1a2e
 			file_addr = file_addr << 11;
8c1a2e
@@ -392,7 +392,7 @@ main(int argc, char *argv[])
8c1a2e
 		if (c == 'f') {
8c1a2e
 			crsr2(20, 1);
8c1a2e
 			printf("Enter new search string:");
8c1a2e
-			fgets((char *)search, sizeof (search), stdin); /* FIXME: check return value */
8c1a2e
+			do{char *ret;ret=fgets((char *)search, sizeof (search), stdin);}while(0); /* FIXME: check return value */
8c1a2e
 			while (search[strlen((char *)search)-1] == '\n')
8c1a2e
 				search[strlen((char *)search)-1] = 0;
8c1a2e
 			crsr2(20, 1);
8c1a2e
diff -up cdrkit-1.1.8/genisoimage/diag/isoinfo.c.werror cdrkit-1.1.8/genisoimage/diag/isoinfo.c
8c1a2e
--- cdrkit-1.1.8/genisoimage/diag/isoinfo.c.werror	2008-05-27 15:34:03.000000000 +0200
8c1a2e
+++ cdrkit-1.1.8/genisoimage/diag/isoinfo.c	2008-05-27 15:34:03.000000000 +0200
8c1a2e
@@ -651,7 +651,7 @@ extract_file(struct iso_directory_record
8c1a2e
 #endif
8c1a2e
 		len -= tlen;
8c1a2e
 		extent++;
8c1a2e
-		write(STDOUT_FILENO, buff, tlen); /* FIXME: check return value */
8c1a2e
+		do{int ret;ret=write(STDOUT_FILENO, buff, tlen);}while(0); /* FIXME: check return value */
8c1a2e
 	}
8c1a2e
 }
8c1a2e
 
8c1a2e
diff -up cdrkit-1.1.8/genisoimage/diag/isodump.c.werror cdrkit-1.1.8/genisoimage/diag/isodump.c
8c1a2e
--- cdrkit-1.1.8/genisoimage/diag/isodump.c.werror	2008-05-27 15:34:03.000000000 +0200
8c1a2e
+++ cdrkit-1.1.8/genisoimage/diag/isodump.c	2008-05-27 15:34:03.000000000 +0200
8c1a2e
@@ -655,7 +655,7 @@ main(int argc, char *argv[])
8c1a2e
 		if (file_addr < 0)
8c1a2e
 			file_addr = (off_t)0;
8c1a2e
 		showblock(1);
8c1a2e
-		read(STDIN_FILENO, &c, 1); /* FIXME: check return value */
8c1a2e
+		do{int ret;ret=read(STDIN_FILENO, &c, 1);}while(0); /* FIXME: check return value */
8c1a2e
 		if (c == 'a')
8c1a2e
 			file_addr -= blocksize;
8c1a2e
 		if (c == 'b')
8c1a2e
@@ -665,11 +665,11 @@ main(int argc, char *argv[])
8c1a2e
 			printf("Enter new starting block (in hex):");
8c1a2e
 			if (sizeof (file_addr) > sizeof (long)) {
8c1a2e
 				Llong	ll;
8c1a2e
-				scanf("%llx", &ll); /* FIXME: check return value */
8c1a2e
+				do{int ret;ret=scanf("%llx", &ll);}while(0); /* FIXME: check return value */
8c1a2e
 				file_addr = (off_t)ll;
8c1a2e
 			} else {
8c1a2e
 				long	l;
8c1a2e
-				scanf("%lx", &l); /* FIXME: check return value */
8c1a2e
+				do{int ret;ret=scanf("%lx", &l);}while(0); /* FIXME: check return value */
8c1a2e
 				file_addr = (off_t)l;
8c1a2e
 			}
8c1a2e
 			file_addr = file_addr * blocksize;
8c1a2e
@@ -679,7 +679,7 @@ main(int argc, char *argv[])
8c1a2e
 		if (c == 'f') {
8c1a2e
 			crsr2(20, 1);
8c1a2e
 			printf("Enter new search string:");
8c1a2e
-			fgets((char *)search, sizeof (search), stdin); /* FIXME: check return value */
8c1a2e
+			do{char *ret;ret=fgets((char *)search, sizeof (search), stdin);}while(0); /* FIXME: check return value */
8c1a2e
 			while (search[strlen((char *)search)-1] == '\n')
8c1a2e
 				search[strlen((char *)search)-1] = 0;
8c1a2e
 			crsr2(20, 1);
8c1a2e
diff -up cdrkit-1.1.8/genisoimage/diag/isovfy.c.werror cdrkit-1.1.8/genisoimage/diag/isovfy.c
8c1a2e
--- cdrkit-1.1.8/genisoimage/diag/isovfy.c.werror	2008-05-27 15:34:03.000000000 +0200
8c1a2e
+++ cdrkit-1.1.8/genisoimage/diag/isovfy.c	2008-05-27 15:34:03.000000000 +0200
8c1a2e
@@ -591,11 +591,11 @@ check_path_tables(int typel_extent, int 
8c1a2e
 	readsecs(typel_extent * blocksize / 2048, typel, ISO_BLOCKS(path_table_size));
8c1a2e
 #else
8c1a2e
 	lseek(fileno(infile), (off_t)((off_t)typel_extent) * blocksize, SEEK_SET);
8c1a2e
-	read(fileno(infile), typel, path_table_size); /* FIXME: check return value */
8c1a2e
+	do{int ret;ret=read(fileno(infile), typel, path_table_size);}while(0); /* FIXME: check return value */
8c1a2e
 #endif
8c1a2e
 	typem = (char *) malloc(path_table_size);
8c1a2e
 	lseek(fileno(infile), (off_t)((off_t)typem_extent) * blocksize, SEEK_SET);
8c1a2e
-	read(fileno(infile), typem, path_table_size); /* FIXME: check return value */
8c1a2e
+	do{int ret;ret=read(fileno(infile), typem, path_table_size);}while(0); /* FIXME: check return value */
8c1a2e
 
8c1a2e
 	j = path_table_size;
8c1a2e
 	pnt = typel;
8c1a2e
diff -up cdrkit-1.1.8/genisoimage/jte.c.werror cdrkit-1.1.8/genisoimage/jte.c
8c1a2e
--- cdrkit-1.1.8/genisoimage/jte.c.werror	2008-05-27 15:34:03.000000000 +0200
8c1a2e
+++ cdrkit-1.1.8/genisoimage/jte.c	2008-05-27 15:34:03.000000000 +0200
8c1a2e
@@ -36,6 +36,8 @@
8c1a2e
 #include "vms.h"
8c1a2e
 #endif
8c1a2e
 
8c1a2e
+#include "md5.h"
8c1a2e
+
8c1a2e
 /* Different types used in building our state list below */
8c1a2e
 #define JTET_FILE_MATCH 1
8c1a2e
 #define JTET_NOMATCH    2
8c1a2e
@@ -643,7 +645,7 @@ static void flush_bz2_chunk(void *buffer
8c1a2e
 
8c1a2e
     err = BZ2_bzCompressInit(&c_stream, 9, 0, 0);
8c1a2e
     comp_buf = malloc(2 * size); /* Worst case */
8c1a2e
-    c_stream.next_out = comp_buf;
8c1a2e
+    c_stream.next_out = (char *)comp_buf;
8c1a2e
     c_stream.avail_out = 2 * size;
8c1a2e
     c_stream.next_in = buffer;
8c1a2e
     c_stream.avail_in = size;
8c1a2e
@@ -691,7 +693,7 @@ static void write_compressed_chunk(unsig
8c1a2e
 		if (!uncomp_buf)
8c1a2e
 		{
8c1a2e
 #ifdef	USE_LIBSCHILY
8c1a2e
-            comerr("failed to allocate %d bytes for template compression buffer\n", uncomp_size);
8c1a2e
+            comerr("failed to allocate %d bytes for template compression buffer\n", (int)uncomp_size);
8c1a2e
 #else
8c1a2e
             fprintf(stderr, "failed to allocate %d bytes for template compression buffer\n", uncomp_size);
8c1a2e
             exit(1);
8c1a2e
@@ -1019,8 +1021,8 @@ void write_jt_match_record(char *filenam
8c1a2e
 #endif
8c1a2e
 		}
8c1a2e
         if (first_block)
8c1a2e
-            rsync64_sum = rsync64(buf, MIN_JIGDO_FILE_SIZE);
8c1a2e
-        checksum_update(iso_context, buf, use);
8c1a2e
+            rsync64_sum = rsync64((unsigned char *)buf, MIN_JIGDO_FILE_SIZE);
8c1a2e
+        checksum_update(iso_context, (unsigned char *)buf, use);
8c1a2e
 //        mk_MD5Update(&iso_context, buf, use);
8c1a2e
         remain -= use;
8c1a2e
         first_block = 0;
8c1a2e
@@ -1033,7 +1035,7 @@ void write_jt_match_record(char *filenam
8c1a2e
     {
8c1a2e
         int pad_size = sector_size - (size % sector_size);
8c1a2e
         memset(buf, 0, pad_size);
8c1a2e
-        checksum_update(iso_context, buf, pad_size);
8c1a2e
+        checksum_update(iso_context, (unsigned char *)buf, pad_size);
8c1a2e
 //        mk_MD5Update(&iso_context, buf, pad_size);
8c1a2e
     }
8c1a2e
 
8c1a2e
@@ -1041,7 +1043,7 @@ void write_jt_match_record(char *filenam
8c1a2e
     if (size % sector_size)
8c1a2e
     {
8c1a2e
         int pad_size = sector_size - (size % sector_size);
8c1a2e
-        write_compressed_chunk(buf, pad_size);
8c1a2e
+        write_compressed_chunk((unsigned char *)buf, pad_size);
8c1a2e
         add_unmatched_entry(pad_size);
8c1a2e
     }        
8c1a2e
 }
8c1a2e
diff -up cdrkit-1.1.8/genisoimage/eltorito.c.werror cdrkit-1.1.8/genisoimage/eltorito.c
8c1a2e
--- cdrkit-1.1.8/genisoimage/eltorito.c.werror	2008-05-27 15:34:03.000000000 +0200
8c1a2e
+++ cdrkit-1.1.8/genisoimage/eltorito.c	2008-05-27 15:34:03.000000000 +0200
8c1a2e
@@ -660,7 +660,7 @@ fill_boot_desc(struct eltorito_defaultbo
8c1a2e
 		set_731(bi_table.bi_length, de->size);
8c1a2e
 		set_731(bi_table.bi_csum, bi_checksum);
8c1a2e
 
8c1a2e
-		write(bootimage, &bi_table, sizeof (bi_table)); /* FIXME: check return value */
8c1a2e
+		do{int ret;ret=write(bootimage, &bi_table, sizeof (bi_table));}while(0); /* FIXME: check return value */
8c1a2e
 		close(bootimage);
8c1a2e
 	}
8c1a2e
 }/* fill_boot_desc(... */