cdrkit-1.1.8-werror.patch 9.1 KB

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