- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
[cdrkit.git] / cdrkit-1.1.8-werror.patch
blobc5189ed5a4ea6d74847141074f86d33d10a970f4
1 diff -up cdrkit-1.1.8/wodim/wodim.c.werror cdrkit-1.1.8/wodim/wodim.c
2 --- cdrkit-1.1.8/wodim/wodim.c.werror 2008-05-27 15:34:03.000000000 +0200
3 +++ cdrkit-1.1.8/wodim/wodim.c 2008-05-27 15:36:22.000000000 +0200
4 @@ -4089,7 +4089,7 @@ audioread(SCSI *usalp, cdr_t *dp, int fl
6 read_scsi(usalp, buf, 1000, 1);
7 printf("XXX:\n");
8 - write(1, buf, 512); /* FIXME: handle return value */
9 + do{int ret;ret=write(1, buf, 512);}while(0); /* FIXME: handle return value */
10 unload_media(usalp, dp, flags);
11 comexit(0);
12 #endif
13 diff -up cdrkit-1.1.8/wodim/isosize.c.werror cdrkit-1.1.8/wodim/isosize.c
14 --- cdrkit-1.1.8/wodim/isosize.c.werror 2008-05-27 15:41:36.000000000 +0200
15 +++ cdrkit-1.1.8/wodim/isosize.c 2008-05-27 15:42:12.000000000 +0200
16 @@ -69,7 +69,7 @@ isosize(int f)
17 vp = (struct iso9660_pr_voldesc *) &vd;
19 do {
20 - read(f, &vd, sizeof (vd)); /* FIXME: check return value */
21 + do{int ret;ret=read(f, &vd, sizeof (vd));}while(0); /* FIXME: check return value */
22 if (GET_UBYTE(vd.vd_type) == VD_PRIMARY)
23 break;
25 diff -up cdrkit-1.1.8/icedax/toc.c.werror cdrkit-1.1.8/icedax/toc.c
26 --- cdrkit-1.1.8/icedax/toc.c.werror 2008-05-27 15:34:03.000000000 +0200
27 +++ cdrkit-1.1.8/icedax/toc.c 2008-05-27 15:41:11.000000000 +0200
28 @@ -1071,7 +1071,7 @@ static int handle_userchoice(char *p, un
29 /* get user response. */
30 do {
31 fprintf(stderr, "please choose one (0-%u): ", nr);
32 - scanf("%u", &user_choice); /* FIXME: check return value */
33 + do{int ret;ret=scanf("%u", &user_choice);}while(0); /* FIXME: check return value */
34 } while (user_choice > nr);
36 if (user_choice == nr)
37 diff -up cdrkit-1.1.8/genisoimage/diag/dump.c.werror cdrkit-1.1.8/genisoimage/diag/dump.c
38 --- cdrkit-1.1.8/genisoimage/diag/dump.c.werror 2008-05-27 15:34:03.000000000 +0200
39 +++ cdrkit-1.1.8/genisoimage/diag/dump.c 2008-05-27 15:34:03.000000000 +0200
40 @@ -368,7 +368,7 @@ main(int argc, char *argv[])
41 do {
42 if (file_addr < (off_t)0) file_addr = (off_t)0;
43 showblock(1);
44 - read(STDIN_FILENO, &c, 1); /* FIXME: check return value */
45 + do{int ret;ret=read(STDIN_FILENO, &c, 1);}while(0); /* FIXME: check return value */
46 if (c == 'a')
47 file_addr -= PAGE;
48 if (c == 'b')
49 @@ -378,11 +378,11 @@ main(int argc, char *argv[])
50 printf("Enter new starting block (in hex):");
51 if (sizeof (file_addr) > sizeof (long)) {
52 Llong ll;
53 - scanf("%llx", &ll); /* FIXME: check return value */
54 + do{int ret;ret=scanf("%llx", &ll);}while(0); /* FIXME: check return value */
55 file_addr = (off_t)ll;
56 } else {
57 long l;
58 - scanf("%lx", &l); /* FIXME: check return value */
59 + do{int ret;ret=scanf("%lx", &l);}while(0); /* FIXME: check return value */
60 file_addr = (off_t)l;
62 file_addr = file_addr << 11;
63 @@ -392,7 +392,7 @@ main(int argc, char *argv[])
64 if (c == 'f') {
65 crsr2(20, 1);
66 printf("Enter new search string:");
67 - fgets((char *)search, sizeof (search), stdin); /* FIXME: check return value */
68 + do{char *ret;ret=fgets((char *)search, sizeof (search), stdin);}while(0); /* FIXME: check return value */
69 while (search[strlen((char *)search)-1] == '\n')
70 search[strlen((char *)search)-1] = 0;
71 crsr2(20, 1);
72 diff -up cdrkit-1.1.8/genisoimage/diag/isoinfo.c.werror cdrkit-1.1.8/genisoimage/diag/isoinfo.c
73 --- cdrkit-1.1.8/genisoimage/diag/isoinfo.c.werror 2008-05-27 15:34:03.000000000 +0200
74 +++ cdrkit-1.1.8/genisoimage/diag/isoinfo.c 2008-05-27 15:34:03.000000000 +0200
75 @@ -651,7 +651,7 @@ extract_file(struct iso_directory_record
76 #endif
77 len -= tlen;
78 extent++;
79 - write(STDOUT_FILENO, buff, tlen); /* FIXME: check return value */
80 + do{int ret;ret=write(STDOUT_FILENO, buff, tlen);}while(0); /* FIXME: check return value */
84 diff -up cdrkit-1.1.8/genisoimage/diag/isodump.c.werror cdrkit-1.1.8/genisoimage/diag/isodump.c
85 --- cdrkit-1.1.8/genisoimage/diag/isodump.c.werror 2008-05-27 15:34:03.000000000 +0200
86 +++ cdrkit-1.1.8/genisoimage/diag/isodump.c 2008-05-27 15:34:03.000000000 +0200
87 @@ -655,7 +655,7 @@ main(int argc, char *argv[])
88 if (file_addr < 0)
89 file_addr = (off_t)0;
90 showblock(1);
91 - read(STDIN_FILENO, &c, 1); /* FIXME: check return value */
92 + do{int ret;ret=read(STDIN_FILENO, &c, 1);}while(0); /* FIXME: check return value */
93 if (c == 'a')
94 file_addr -= blocksize;
95 if (c == 'b')
96 @@ -665,11 +665,11 @@ main(int argc, char *argv[])
97 printf("Enter new starting block (in hex):");
98 if (sizeof (file_addr) > sizeof (long)) {
99 Llong ll;
100 - scanf("%llx", &ll); /* FIXME: check return value */
101 + do{int ret;ret=scanf("%llx", &ll);}while(0); /* FIXME: check return value */
102 file_addr = (off_t)ll;
103 } else {
104 long l;
105 - scanf("%lx", &l); /* FIXME: check return value */
106 + do{int ret;ret=scanf("%lx", &l);}while(0); /* FIXME: check return value */
107 file_addr = (off_t)l;
109 file_addr = file_addr * blocksize;
110 @@ -679,7 +679,7 @@ main(int argc, char *argv[])
111 if (c == 'f') {
112 crsr2(20, 1);
113 printf("Enter new search string:");
114 - fgets((char *)search, sizeof (search), stdin); /* FIXME: check return value */
115 + do{char *ret;ret=fgets((char *)search, sizeof (search), stdin);}while(0); /* FIXME: check return value */
116 while (search[strlen((char *)search)-1] == '\n')
117 search[strlen((char *)search)-1] = 0;
118 crsr2(20, 1);
119 diff -up cdrkit-1.1.8/genisoimage/diag/isovfy.c.werror cdrkit-1.1.8/genisoimage/diag/isovfy.c
120 --- cdrkit-1.1.8/genisoimage/diag/isovfy.c.werror 2008-05-27 15:34:03.000000000 +0200
121 +++ cdrkit-1.1.8/genisoimage/diag/isovfy.c 2008-05-27 15:34:03.000000000 +0200
122 @@ -591,11 +591,11 @@ check_path_tables(int typel_extent, int
123 readsecs(typel_extent * blocksize / 2048, typel, ISO_BLOCKS(path_table_size));
124 #else
125 lseek(fileno(infile), (off_t)((off_t)typel_extent) * blocksize, SEEK_SET);
126 - read(fileno(infile), typel, path_table_size); /* FIXME: check return value */
127 + do{int ret;ret=read(fileno(infile), typel, path_table_size);}while(0); /* FIXME: check return value */
128 #endif
129 typem = (char *) malloc(path_table_size);
130 lseek(fileno(infile), (off_t)((off_t)typem_extent) * blocksize, SEEK_SET);
131 - read(fileno(infile), typem, path_table_size); /* FIXME: check return value */
132 + do{int ret;ret=read(fileno(infile), typem, path_table_size);}while(0); /* FIXME: check return value */
134 j = path_table_size;
135 pnt = typel;
136 diff -up cdrkit-1.1.8/genisoimage/jte.c.werror cdrkit-1.1.8/genisoimage/jte.c
137 --- cdrkit-1.1.8/genisoimage/jte.c.werror 2008-05-27 15:34:03.000000000 +0200
138 +++ cdrkit-1.1.8/genisoimage/jte.c 2008-05-27 15:34:03.000000000 +0200
139 @@ -36,6 +36,8 @@
140 #include "vms.h"
141 #endif
143 +#include "md5.h"
145 /* Different types used in building our state list below */
146 #define JTET_FILE_MATCH 1
147 #define JTET_NOMATCH 2
148 @@ -643,7 +645,7 @@ static void flush_bz2_chunk(void *buffer
150 err = BZ2_bzCompressInit(&c_stream, 9, 0, 0);
151 comp_buf = malloc(2 * size); /* Worst case */
152 - c_stream.next_out = comp_buf;
153 + c_stream.next_out = (char *)comp_buf;
154 c_stream.avail_out = 2 * size;
155 c_stream.next_in = buffer;
156 c_stream.avail_in = size;
157 @@ -691,7 +693,7 @@ static void write_compressed_chunk(unsig
158 if (!uncomp_buf)
160 #ifdef USE_LIBSCHILY
161 - comerr("failed to allocate %d bytes for template compression buffer\n", uncomp_size);
162 + comerr("failed to allocate %d bytes for template compression buffer\n", (int)uncomp_size);
163 #else
164 fprintf(stderr, "failed to allocate %d bytes for template compression buffer\n", uncomp_size);
165 exit(1);
166 @@ -1019,8 +1021,8 @@ void write_jt_match_record(char *filenam
167 #endif
169 if (first_block)
170 - rsync64_sum = rsync64(buf, MIN_JIGDO_FILE_SIZE);
171 - checksum_update(iso_context, buf, use);
172 + rsync64_sum = rsync64((unsigned char *)buf, MIN_JIGDO_FILE_SIZE);
173 + checksum_update(iso_context, (unsigned char *)buf, use);
174 // mk_MD5Update(&iso_context, buf, use);
175 remain -= use;
176 first_block = 0;
177 @@ -1033,7 +1035,7 @@ void write_jt_match_record(char *filenam
179 int pad_size = sector_size - (size % sector_size);
180 memset(buf, 0, pad_size);
181 - checksum_update(iso_context, buf, pad_size);
182 + checksum_update(iso_context, (unsigned char *)buf, pad_size);
183 // mk_MD5Update(&iso_context, buf, pad_size);
186 @@ -1041,7 +1043,7 @@ void write_jt_match_record(char *filenam
187 if (size % sector_size)
189 int pad_size = sector_size - (size % sector_size);
190 - write_compressed_chunk(buf, pad_size);
191 + write_compressed_chunk((unsigned char *)buf, pad_size);
192 add_unmatched_entry(pad_size);
195 diff -up cdrkit-1.1.8/genisoimage/eltorito.c.werror cdrkit-1.1.8/genisoimage/eltorito.c
196 --- cdrkit-1.1.8/genisoimage/eltorito.c.werror 2008-05-27 15:34:03.000000000 +0200
197 +++ cdrkit-1.1.8/genisoimage/eltorito.c 2008-05-27 15:34:03.000000000 +0200
198 @@ -660,7 +660,7 @@ fill_boot_desc(struct eltorito_defaultbo
199 set_731(bi_table.bi_length, de->size);
200 set_731(bi_table.bi_csum, bi_checksum);
202 - write(bootimage, &bi_table, sizeof (bi_table)); /* FIXME: check return value */
203 + do{int ret;ret=write(bootimage, &bi_table, sizeof (bi_table));}while(0); /* FIXME: check return value */
204 close(bootimage);
206 }/* fill_boot_desc(... */