From 1d728a96dae45f132fdd01fc08f51976a53b6e14 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 27 Feb 2008 09:07:06 +0000 Subject: [PATCH] - refined -Werror patch --- cdrkit-1.1.6-werror.patch | 1135 +++++++++++++++++++------------------ cdrkit.spec | 5 +- 2 files changed, 576 insertions(+), 564 deletions(-) diff --git a/cdrkit-1.1.6-werror.patch b/cdrkit-1.1.6-werror.patch index b39388e..22e05e4 100644 --- a/cdrkit-1.1.6-werror.patch +++ b/cdrkit-1.1.6-werror.patch @@ -1,356 +1,54 @@ -diff -up cdrkit-1.1.6/genisoimage/boot-hppa.c.werror cdrkit-1.1.6/genisoimage/boot-hppa.c ---- cdrkit-1.1.6/genisoimage/boot-hppa.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/genisoimage/boot-hppa.c 2008-02-25 11:09:02.000000000 +0100 -@@ -177,7 +177,7 @@ static int boot_hppa_write(FILE *outfile - write_be32(length, &boot_sector[20]); +diff -up cdrkit-1.1.6.new/libhfs_iso/hfs.h.werror cdrkit-1.1.6.new/libhfs_iso/hfs.h +--- cdrkit-1.1.6.new/libhfs_iso/hfs.h.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/libhfs_iso/hfs.h 2008-02-27 09:37:52.000000000 +0100 +@@ -29,6 +29,8 @@ + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ ++#ifndef HFS_H ++#define HFS_H - /* Now the commandline */ -- snprintf(&boot_sector[24], 127, "%s", hppa_cmdline); -+ snprintf((char *)&boot_sector[24], 127, "%s", hppa_cmdline); - - /* Find the dir entry for the 64-bit kernel by walking our file list */ - boot_file = search_tree_file(root, hppa_kernel_64); -diff -up cdrkit-1.1.6/genisoimage/multi.c.werror cdrkit-1.1.6/genisoimage/multi.c ---- cdrkit-1.1.6/genisoimage/multi.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/genisoimage/multi.c 2008-02-25 11:09:02.000000000 +0100 -@@ -1064,7 +1064,7 @@ check_prev_session(struct directory_entr - } - /* We found it and we can reuse the extent */ - memcpy(curr_entry->isorec.extent, ptr[i]->isorec.extent, 8); -- curr_entry->starting_block = isonum_733(ptr[i]->isorec.extent); -+ curr_entry->starting_block = isonum_733((unsigned char *)ptr[i]->isorec.extent); - curr_entry->de_flags |= SAFE_TO_REUSE_TABLE_ENTRY; - goto found_it; - } -diff -up cdrkit-1.1.6/genisoimage/joliet.c.werror cdrkit-1.1.6/genisoimage/joliet.c ---- cdrkit-1.1.6/genisoimage/joliet.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/genisoimage/joliet.c 2008-02-25 11:09:02.000000000 +0100 -@@ -250,9 +250,9 @@ convert_to_unicode(unsigned char *buffer - #ifdef USE_ICONV - if (inls->iconv_d && inls->unls_cs2uni==NULL && - inls->unls_uni2cs==NULL) { -- char *inptr = tmpbuf; -- char *outptr = buffer; -- size_t inleft = strlen(tmpbuf); -+ char *inptr = (char *)tmpbuf; -+ char *outptr = (char *)buffer; -+ size_t inleft = (size_t)strlen((char *)tmpbuf); - size_t inlen = inleft; - size_t outleft = size; - -diff -up cdrkit-1.1.6/genisoimage/eltorito.c.werror cdrkit-1.1.6/genisoimage/eltorito.c ---- cdrkit-1.1.6/genisoimage/eltorito.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/genisoimage/eltorito.c 2008-02-25 11:09:02.000000000 +0100 -@@ -600,7 +600,7 @@ fill_boot_desc(struct eltorito_defaultbo - static char csum_buffer[SECTOR_SIZE]; - int len; - struct genisoimage_boot_info bi_table; -- -+ int ret; - bootimage = open(de->whole_name, O_RDWR | O_BINARY); - if (bootimage == -1) { - #ifdef USE_LIBSCHILY -@@ -661,7 +661,7 @@ fill_boot_desc(struct eltorito_defaultbo - set_731(bi_table.bi_length, de->size); - set_731(bi_table.bi_csum, bi_checksum); - -- write(bootimage, &bi_table, sizeof (bi_table)); -+ ret = write(bootimage, &bi_table, sizeof (bi_table)); - close(bootimage); - } - }/* fill_boot_desc(... */ -diff -up cdrkit-1.1.6/genisoimage/write.c.werror cdrkit-1.1.6/genisoimage/write.c ---- cdrkit-1.1.6/genisoimage/write.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/genisoimage/write.c 2008-02-25 11:09:02.000000000 +0100 -@@ -303,7 +303,8 @@ xfwrite(void *buffer, int size, int coun - * which is wrong this code. (void *) introduces a compatible - * intermediate type in the cast list. - */ -- count -= got, *(char **)(void *)&buffer += size * got; -+ count -= got; -+ buffer = (void *)(((char *)buffer) + size * got); - } - } - -@@ -918,8 +919,8 @@ reassign_link_addresses(struct directory - - if (verbose > 2 && s_entry->size != 0) { - fprintf(stderr, "%8d %8d ", -- s_entry->starting_block, -- s_entry->starting_block + ISO_BLOCKS(s_entry->size) - 1); -+ (int)s_entry->starting_block, -+ (int)(s_entry->starting_block + ISO_BLOCKS(s_entry->size) - 1)); - - if (s_entry->inode != TABLE_INODE) { - fprintf(stderr, "%s\n", s_entry->whole_name); -diff -up cdrkit-1.1.6/genisoimage/tree.c.werror cdrkit-1.1.6/genisoimage/tree.c ---- cdrkit-1.1.6/genisoimage/tree.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/genisoimage/tree.c 2008-02-25 11:09:02.000000000 +0100 -@@ -41,6 +41,7 @@ - #include - #include "genisoimage.h" - #include "match.h" -+#include "udf.h" - #include "exclude.h" #include - #include -diff -up cdrkit-1.1.6/genisoimage/md5.c.werror cdrkit-1.1.6/genisoimage/md5.c ---- cdrkit-1.1.6/genisoimage/md5.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/genisoimage/md5.c 2008-02-25 11:09:02.000000000 +0100 -@@ -352,15 +352,15 @@ int calculate_md5sum(char *filename, uns - remain = size; - while (remain > 0) - { -- use = (remain > sizeof(buffer) ? sizeof(buffer) : remain); -- if (fread(buffer, 1, use, infile) == 0) -+ use = (remain > sizeof(buffer) ? sizeof(buffer) : remain); -+ if (fread(buffer, 1, use, infile) == 0) - { -- fprintf(stderr, "cannot read from '%s'\n", filename); -- exit(1); -- } -- /* Update the checksum */ -- mk_MD5Update(&file_context, buffer, use); -- remain -= use; -+ fprintf(stderr, "cannot read from '%s'\n", filename); -+ exit(1); -+ } -+ /* Update the checksum */ -+ mk_MD5Update(&file_context, (unsigned char *)buffer, use); -+ remain -= use; - } - fclose(infile); - mk_MD5Final(&out[0], &file_context); -diff -up cdrkit-1.1.6/genisoimage/boot-mips.c.werror cdrkit-1.1.6/genisoimage/boot-mips.c ---- cdrkit-1.1.6/genisoimage/boot-mips.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/genisoimage/boot-mips.c 2008-02-25 11:09:02.000000000 +0100 -@@ -310,7 +310,7 @@ static int boot_mips_write(FILE *outfile - length = ((get_733(boot_file->isorec.size) + 2047) / 2048) * 2048; - filename = file_base_name(boot_mips_filename[i]); + #include +@@ -195,8 +197,12 @@ int hfs_delete(hfsvol *, char *); -- strncpy(vh.vh_vd[i].vd_name, filename, MIN(VDNAMESIZE, strlen(filename))); -+ strncpy((char *)vh.vh_vd[i].vd_name, filename, MIN(VDNAMESIZE, strlen(filename))); - write_be32(extent, (unsigned char *)&vh.vh_vd[i].vd_lbn); - write_be32(length, (unsigned char *)&vh.vh_vd[i].vd_nbytes); - -diff -up cdrkit-1.1.6/genisoimage/jte.c.werror cdrkit-1.1.6/genisoimage/jte.c ---- cdrkit-1.1.6/genisoimage/jte.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/genisoimage/jte.c 2008-02-25 11:09:02.000000000 +0100 -@@ -531,13 +531,13 @@ static void parse_md5_list(void) - } + int hfs_rename(hfsvol *, char *, char *); - memset(buf, 0, sizeof(buf)); -- while (fgets(buf, sizeof(buf), md5_file)) -+ while (fgets((char *)buf, sizeof(buf), md5_file)) - { - numbuf = &buf[34]; -- filename = &buf[48]; -+ filename = (char *)&buf[48]; - /* Lose the trailing \n from the fgets() call */ -- if (buf[strlen(buf)-1] == '\n') -- buf[strlen(buf)-1] = 0; -+ if (buf[strlen((char *)buf)-1] == '\n') -+ buf[strlen((char *)buf)-1] = 0; - - if (mk_MD5Parse(buf, md5)) - { -@@ -849,7 +849,7 @@ void write_jt_footer(void) - /* And calculate the image size */ - image_size = (unsigned long long)SECTOR_SIZE * last_extent_written; - -- write_template_desc_entries(image_size, md5); -+ write_template_desc_entries(image_size, (char *)md5); - - write_jigdo_file(); - } -@@ -989,8 +989,8 @@ void write_jt_match_record(char *filenam - #endif - } - if (first_block) -- rsync64_sum = rsync64(buf, MIN_JIGDO_FILE_SIZE); -- mk_MD5Update(&iso_context, buf, use); -+ rsync64_sum = rsync64((unsigned char *)buf, MIN_JIGDO_FILE_SIZE); -+ mk_MD5Update(&iso_context, (unsigned char *)buf, use); - remain -= use; - first_block = 0; - } -@@ -1002,14 +1002,14 @@ void write_jt_match_record(char *filenam - { - int pad_size = sector_size - (size % sector_size); - memset(buf, 0, pad_size); -- mk_MD5Update(&iso_context, buf, pad_size); -+ mk_MD5Update(&iso_context, (unsigned char *)buf, pad_size); - } - - add_file_entry(mirror_name, size, &md5[0], rsync64_sum); - if (size % sector_size) - { - int pad_size = sector_size - (size % sector_size); -- write_compressed_chunk(buf, pad_size); -+ write_compressed_chunk((unsigned char *)buf, pad_size); - add_unmatched_entry(pad_size); - } - } -diff -up cdrkit-1.1.6/genisoimage/genisoimage.c.werror cdrkit-1.1.6/genisoimage/genisoimage.c ---- cdrkit-1.1.6/genisoimage/genisoimage.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/genisoimage/genisoimage.c 2008-02-25 11:09:02.000000000 +0100 -@@ -2451,8 +2451,8 @@ parse_input_files: - if (stream_filename) { - if (strlen(stream_filename) > MAX_ISONAME) - comerrno(EX_BAD, -- "stream-file-name too long (%d), max is %d.\n", -- strlen(stream_filename), MAX_ISONAME); -+ "stream-file-name too long (%d), max is %d.\n", -+ (int)strlen(stream_filename), (int)MAX_ISONAME); - if (strchr(stream_filename, '/')) - comerrno(EX_BAD, "Illegal character '/' in stream-file-name.\n"); - iso9660_level = 4; -diff -up cdrkit-1.1.6/genisoimage/diag/isodump.c.werror cdrkit-1.1.6/genisoimage/diag/isodump.c ---- cdrkit-1.1.6/genisoimage/diag/isodump.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/genisoimage/diag/isodump.c 2008-02-25 11:09:02.000000000 +0100 -@@ -652,10 +652,11 @@ main(int argc, char *argv[]) - on_comerr((void(*)(int, void *))reset_tty, NULL); - - do { -+ int ret; - if (file_addr < 0) - file_addr = (off_t)0; - showblock(1); -- read(STDIN_FILENO, &c, 1); -+ ret = read(STDIN_FILENO, &c, 1); - if (c == 'a') - file_addr -= blocksize; - if (c == 'b') -@@ -665,11 +666,11 @@ main(int argc, char *argv[]) - printf("Enter new starting block (in hex):"); - if (sizeof (file_addr) > sizeof (long)) { - Llong ll; -- scanf("%llx", &ll); -+ ret = scanf("%llx", &ll); - file_addr = (off_t)ll; - } else { - long l; -- scanf("%lx", &l); -+ ret = scanf("%lx", &l); - file_addr = (off_t)l; - } - file_addr = file_addr * blocksize; -@@ -677,9 +678,10 @@ main(int argc, char *argv[]) - printf(" "); - } - if (c == 'f') { -+ char *ret; - crsr2(20, 1); - printf("Enter new search string:"); -- fgets((char *)search, sizeof (search), stdin); -+ ret = fgets((char *)search, sizeof (search), stdin); - while (search[strlen((char *)search)-1] == '\n') - search[strlen((char *)search)-1] = 0; - crsr2(20, 1); -diff -up cdrkit-1.1.6/genisoimage/diag/dump.c.werror cdrkit-1.1.6/genisoimage/diag/dump.c ---- cdrkit-1.1.6/genisoimage/diag/dump.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/genisoimage/diag/dump.c 2008-02-25 11:09:02.000000000 +0100 -@@ -366,9 +366,10 @@ main(int argc, char *argv[]) - on_comerr((void(*)(int, void *))reset_tty, NULL); - - do { -+ int ret; - if (file_addr < (off_t)0) file_addr = (off_t)0; - showblock(1); -- read(STDIN_FILENO, &c, 1); -+ ret = read(STDIN_FILENO, &c, 1); - if (c == 'a') - file_addr -= PAGE; - if (c == 'b') -@@ -378,11 +379,11 @@ main(int argc, char *argv[]) - printf("Enter new starting block (in hex):"); - if (sizeof (file_addr) > sizeof (long)) { - Llong ll; -- scanf("%llx", &ll); -+ ret = scanf("%llx", &ll); - file_addr = (off_t)ll; - } else { - long l; -- scanf("%lx", &l); -+ ret = scanf("%lx", &l); - file_addr = (off_t)l; - } - file_addr = file_addr << 11; -@@ -390,9 +391,10 @@ main(int argc, char *argv[]) - printf(" "); - } - if (c == 'f') { -+ char *ret; - crsr2(20, 1); - printf("Enter new search string:"); -- fgets((char *)search, sizeof (search), stdin); -+ ret = fgets((char *)search, sizeof (search), stdin); - while (search[strlen((char *)search)-1] == '\n') - search[strlen((char *)search)-1] = 0; - crsr2(20, 1); -diff -up cdrkit-1.1.6/genisoimage/diag/isoinfo.c.werror cdrkit-1.1.6/genisoimage/diag/isoinfo.c ---- cdrkit-1.1.6/genisoimage/diag/isoinfo.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/genisoimage/diag/isoinfo.c 2008-02-25 11:09:02.000000000 +0100 -@@ -641,6 +641,7 @@ extract_file(struct iso_directory_record - len = isonum_733((unsigned char *)idr->size); - - while (len > 0) { -+ int ret; - #ifdef USE_SCG - readsecs(extent - sector_offset, buff, ISO_BLOCKS(sizeof (buff))); - tlen = (len > sizeof (buff) ? sizeof (buff) : len); -@@ -651,7 +652,7 @@ extract_file(struct iso_directory_record - #endif - len -= tlen; - extent++; -- write(STDOUT_FILENO, buff, tlen); -+ ret = write(STDOUT_FILENO, buff, tlen); - } - } - -diff -up cdrkit-1.1.6/genisoimage/diag/isovfy.c.werror cdrkit-1.1.6/genisoimage/diag/isovfy.c ---- cdrkit-1.1.6/genisoimage/diag/isovfy.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/genisoimage/diag/isovfy.c 2008-02-25 11:09:02.000000000 +0100 -@@ -583,6 +583,7 @@ check_path_tables(int typel_extent, int - char *pnt; - char *typel; - char *typem; -+ int ret; - - /* Now read in the path tables */ - -@@ -591,11 +592,11 @@ check_path_tables(int typel_extent, int - readsecs(typel_extent * blocksize / 2048, typel, ISO_BLOCKS(path_table_size)); - #else - lseek(fileno(infile), (off_t)((off_t)typel_extent) * blocksize, SEEK_SET); -- read(fileno(infile), typel, path_table_size); -+ ret = read(fileno(infile), typel, path_table_size); - #endif - typem = (char *) malloc(path_table_size); - lseek(fileno(infile), (off_t)((off_t)typem_extent) * blocksize, SEEK_SET); -- read(fileno(infile), typem, path_table_size); -+ ret = read(fileno(infile), typem, path_table_size); - - j = path_table_size; - pnt = typel; -diff -up cdrkit-1.1.6/include/libport.h.werror cdrkit-1.1.6/include/libport.h ---- cdrkit-1.1.6/include/libport.h.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/include/libport.h 2008-02-25 11:09:02.000000000 +0100 -@@ -67,9 +67,11 @@ - /* Linux MAXHOSTNAMELEN */ - #endif - #ifdef MAXHOSTNAMELEN -+#ifndef HOST_NAME_MAX - #define HOST_NAME_MAX MAXHOSTNAMELEN - #endif - #endif ++int f_trunc(hfsfile *file); ++ + #ifdef APPLE_HYB + unsigned short hfs_get_drAllocPtr(hfsfile *); + int hfs_set_drAllocPtr(hfsfile *, unsigned short, int size); + void hfs_vsetbless(hfsvol *, unsigned long); + #endif /* APPLE_HYB */ ++ +#endif +diff -up cdrkit-1.1.6.new/libhfs_iso/hfs.c.werror cdrkit-1.1.6.new/libhfs_iso/hfs.c +--- cdrkit-1.1.6.new/libhfs_iso/hfs.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/libhfs_iso/hfs.c 2008-02-27 09:37:52.000000000 +0100 +@@ -50,6 +50,7 @@ + #include "node.h" + #include "record.h" + #include "volume.h" ++#include "hfs.h" - #ifndef HOST_NAME_MAX - #define HOST_NAME_MAX 255 -diff -up cdrkit-1.1.6/libusal/scsi-linux-ata.c.werror cdrkit-1.1.6/libusal/scsi-linux-ata.c ---- cdrkit-1.1.6/libusal/scsi-linux-ata.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/libusal/scsi-linux-ata.c 2008-02-25 11:09:02.000000000 +0100 + /* High-Level Volume Routines ============================================== */ + +diff -up cdrkit-1.1.6.new/libusal/usal/usalops.h.werror cdrkit-1.1.6.new/libusal/usal/usalops.h +--- cdrkit-1.1.6.new/libusal/usal/usalops.h.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/libusal/usal/usalops.h 2008-02-27 09:37:52.000000000 +0100 +@@ -76,6 +76,8 @@ typedef struct usal_ops { + #define SCGO_ISATAPI(usalp) (*(usalp)->ops->usalo_isatapi)(usalp) + #define SCGO_RESET(usalp, what) (*(usalp)->ops->usalo_reset)(usalp, what) + ++extern int usal_fileno(SCSI *usalp, int busno, int tgt, int tlun); ++extern char * usal_natname(SCSI *usalp, int busno, int tgt, int tlun); + #ifdef __cplusplus + } + #endif +diff -up cdrkit-1.1.6.new/libusal/scsi-linux-ata.c.werror cdrkit-1.1.6.new/libusal/scsi-linux-ata.c +--- cdrkit-1.1.6.new/libusal/scsi-linux-ata.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/libusal/scsi-linux-ata.c 2008-02-27 09:37:52.000000000 +0100 @@ -258,7 +258,7 @@ openbydev: starget, slun; @@ -386,9 +84,9 @@ diff -up cdrkit-1.1.6/libusal/scsi-linux-ata.c.werror cdrkit-1.1.6/libusal/scsi- if (sp->sense_len > sizeof (sense_cgc)) sense_cgc.add_sense_len = sizeof (sense_cgc) - 8; -diff -up cdrkit-1.1.6/libusal/scsi-linux-sg.c.werror cdrkit-1.1.6/libusal/scsi-linux-sg.c ---- cdrkit-1.1.6/libusal/scsi-linux-sg.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/libusal/scsi-linux-sg.c 2008-02-25 11:14:41.000000000 +0100 +diff -up cdrkit-1.1.6.new/libusal/scsi-linux-sg.c.werror cdrkit-1.1.6.new/libusal/scsi-linux-sg.c +--- cdrkit-1.1.6.new/libusal/scsi-linux-sg.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/libusal/scsi-linux-sg.c 2008-02-27 09:37:52.000000000 +0100 @@ -181,7 +181,7 @@ typedef struct { struct usal_local { int usalfile; /* Used for SG_GET_BUFSIZE ioctl()*/ @@ -493,9 +191,9 @@ diff -up cdrkit-1.1.6/libusal/scsi-linux-sg.c.werror cdrkit-1.1.6/libusal/scsi-l char *cut, *ende; char buf[64]; cut=strstr(globbuf.gl_pathv[i], "/device/")+4; -diff -up cdrkit-1.1.6/libusal/scsierrs.c.werror cdrkit-1.1.6/libusal/scsierrs.c ---- cdrkit-1.1.6/libusal/scsierrs.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/libusal/scsierrs.c 2008-02-25 11:09:02.000000000 +0100 +diff -up cdrkit-1.1.6.new/libusal/scsierrs.c.werror cdrkit-1.1.6.new/libusal/scsierrs.c +--- cdrkit-1.1.6.new/libusal/scsierrs.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/libusal/scsierrs.c 2008-02-27 09:37:52.000000000 +0100 @@ -55,6 +55,7 @@ const char *usal_sensemsg(int, int, int, const char **, char *, int maxcnt); int usal__errmsg(SCSI *usalp, char *obuf, int maxcnt, struct scsi_sense *, @@ -529,21 +227,9 @@ diff -up cdrkit-1.1.6/libusal/scsierrs.c.werror cdrkit-1.1.6/libusal/scsierrs.c const char * usal_sensemsg(register int ctype, register int code, register int qual, -diff -up cdrkit-1.1.6/libusal/usal/usalops.h.werror cdrkit-1.1.6/libusal/usal/usalops.h ---- cdrkit-1.1.6/libusal/usal/usalops.h.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/libusal/usal/usalops.h 2008-02-25 11:09:02.000000000 +0100 -@@ -76,6 +76,8 @@ typedef struct usal_ops { - #define SCGO_ISATAPI(usalp) (*(usalp)->ops->usalo_isatapi)(usalp) - #define SCGO_RESET(usalp, what) (*(usalp)->ops->usalo_reset)(usalp, what) - -+extern int usal_fileno(SCSI *usalp, int busno, int tgt, int tlun); -+extern char * usal_natname(SCSI *usalp, int busno, int tgt, int tlun); - #ifdef __cplusplus - } - #endif -diff -up cdrkit-1.1.6/libusal/scsitransp.c.werror cdrkit-1.1.6/libusal/scsitransp.c ---- cdrkit-1.1.6/libusal/scsitransp.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/libusal/scsitransp.c 2008-02-25 11:09:02.000000000 +0100 +diff -up cdrkit-1.1.6.new/libusal/scsitransp.c.werror cdrkit-1.1.6.new/libusal/scsitransp.c +--- cdrkit-1.1.6.new/libusal/scsitransp.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/libusal/scsitransp.c 2008-02-27 09:37:52.000000000 +0100 @@ -1154,7 +1154,7 @@ usal_sense_table(SCSI *usalp) return (0); @@ -553,201 +239,9 @@ diff -up cdrkit-1.1.6/libusal/scsitransp.c.werror cdrkit-1.1.6/libusal/scsitrans } -diff -up cdrkit-1.1.6/librols/fexec.c.werror cdrkit-1.1.6/librols/fexec.c ---- cdrkit-1.1.6/librols/fexec.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/librols/fexec.c 2008-02-25 11:09:02.000000000 +0100 -@@ -204,6 +204,8 @@ fexecve(name, in, out, err, av, env) - int o[3]; - int f[3]; - int errsav; -+ -+ o[0] = o[1] = o[2] = f[0] = f[1] = f[2] = 0; - #endif - - fflush(out); -diff -up cdrkit-1.1.6/librols/raisecond.c.werror cdrkit-1.1.6/librols/raisecond.c ---- cdrkit-1.1.6/librols/raisecond.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/librols/raisecond.c 2008-02-25 11:09:02.000000000 +0100 -@@ -58,8 +58,8 @@ - #ifndef STDERR_FILENO - #define STDERR_FILENO 2 - #endif --#define eprints(a) (void)write(STDERR_FILENO, (a), sizeof (a)-1) --#define eprintl(a) (void)write(STDERR_FILENO, (a), strlen(a)) -+#define eprints(a) write(STDERR_FILENO, (a), sizeof (a)-1) -+#define eprintl(a) write(STDERR_FILENO, (a), strlen(a)) - - #define is_even(p) ((((long)(p)) & 1) == 0) - #define even(p) (((long)(p)) & ~1L) -@@ -173,7 +173,8 @@ LOCAL void - raiseabort(signame) - const char *signame; - { -- eprints("Condition not caught: "); eprintl(signame); eprints(".\n"); -+ int a; -+ a=eprints("Condition not caught: "); a=eprintl(signame); a=eprints(".\n"); - abort(); - /* NOTREACHED */ - } -diff -up cdrkit-1.1.6/librols/default.c.werror cdrkit-1.1.6/librols/default.c ---- cdrkit-1.1.6/librols/default.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/librols/default.c 2008-02-25 11:09:02.000000000 +0100 -@@ -56,7 +56,7 @@ static char *get_value(FILE *srcfile, co - next_line: - while(fgets(linebuf, sizeof(linebuf)-1, srcfile)) { - int i; -- int keybeg; -+ int keybeg=0; - int s=KEYBEGINSEARCH; - char *ret=NULL; - int lastchar=0; -diff -up cdrkit-1.1.6/libhfs_iso/hfs.h.werror cdrkit-1.1.6/libhfs_iso/hfs.h ---- cdrkit-1.1.6/libhfs_iso/hfs.h.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/libhfs_iso/hfs.h 2008-02-25 11:09:02.000000000 +0100 -@@ -29,6 +29,8 @@ - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -+#ifndef HFS_H -+#define HFS_H - - #include - #include -@@ -195,8 +197,12 @@ int hfs_delete(hfsvol *, char *); - - int hfs_rename(hfsvol *, char *, char *); - -+int f_trunc(hfsfile *file); -+ - #ifdef APPLE_HYB - unsigned short hfs_get_drAllocPtr(hfsfile *); - int hfs_set_drAllocPtr(hfsfile *, unsigned short, int size); - void hfs_vsetbless(hfsvol *, unsigned long); - #endif /* APPLE_HYB */ -+ -+#endif -diff -up cdrkit-1.1.6/libhfs_iso/hfs.c.werror cdrkit-1.1.6/libhfs_iso/hfs.c ---- cdrkit-1.1.6/libhfs_iso/hfs.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/libhfs_iso/hfs.c 2008-02-25 11:09:02.000000000 +0100 -@@ -50,6 +50,7 @@ - #include "node.h" - #include "record.h" - #include "volume.h" -+#include "hfs.h" - - /* High-Level Volume Routines ============================================== */ - -diff -up cdrkit-1.1.6/wodim/drv_mmc.c.werror cdrkit-1.1.6/wodim/drv_mmc.c ---- cdrkit-1.1.6/wodim/drv_mmc.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/wodim/drv_mmc.c 2008-02-25 11:09:02.000000000 +0100 -@@ -59,6 +59,7 @@ - #include "scsimmc.h" - #include "mmcvendor.h" - #include "wodim.h" -+#include "scsi_scan.h" - - extern char *driveropts; - -@@ -165,6 +166,8 @@ static int do_tattoo_yamaha(SCSI *usalp - static int yamaha_write_buffer(SCSI *usalp, int mode, int bufferid, long offset, - long parlen, void *buffer, long buflen); - static int dvd_dual_layer_split(SCSI *usalp, cdr_t *dp, long tsize); -+extern int reserve_track(SCSI *usalp, Ulong size); -+extern int scsi_format(SCSI *usalp, caddr_t addr, int size, BOOL background); - - #ifdef __needed__ - static int -@@ -2851,9 +2854,9 @@ extern char *buf; - flush(); - } - if (formattype == FULL_FORMAT) { -- ret = scsi_format(usalp, &addr, sizeof(addr), FALSE); -+ ret = scsi_format(usalp, (caddr_t)&addr, sizeof(addr), FALSE); - } else { -- ret = scsi_format(usalp, &addr, sizeof(addr), TRUE); -+ ret = scsi_format(usalp, (caddr_t)&addr, sizeof(addr), TRUE); - } - if (ret < 0) - return (ret); -diff -up cdrkit-1.1.6/wodim/wodim.c.werror cdrkit-1.1.6/wodim/wodim.c ---- cdrkit-1.1.6/wodim/wodim.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/wodim/wodim.c 2008-02-25 11:09:02.000000000 +0100 -@@ -4076,6 +4076,7 @@ audioread(SCSI *usalp, cdr_t *dp, int fl - #ifdef DEBUG - int speed = 1; - int oflags = dp->cdr_cmdflags; -+ int ret; - - dp->cdr_cmdflags &= ~F_DUMMY; - if ((*dp->cdr_set_speed_dummy)(usalp, dp, &speed) < 0) -@@ -4089,7 +4090,7 @@ audioread(SCSI *usalp, cdr_t *dp, int fl - - read_scsi(usalp, buf, 1000, 1); - printf("XXX:\n"); -- write(1, buf, 512); -+ ret = write(1, buf, 512); - unload_media(usalp, dp, flags); - comexit(0); - #endif -diff -up cdrkit-1.1.6/wodim/scsi_cdr.c.werror cdrkit-1.1.6/wodim/scsi_cdr.c ---- cdrkit-1.1.6/wodim/scsi_cdr.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/wodim/scsi_cdr.c 2008-02-25 11:09:02.000000000 +0100 -@@ -63,6 +63,7 @@ - - #include "scsimmc.h" - #include "wodim.h" -+#include "scsi_scan.h" - - #define strbeg(s1, s2) (strstr((s2), (s1)) == (s2)) - -diff -up cdrkit-1.1.6/wodim/scsi_scan.c.werror cdrkit-1.1.6/wodim/scsi_scan.c ---- cdrkit-1.1.6/wodim/scsi_scan.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/wodim/scsi_scan.c 2008-02-25 11:09:02.000000000 +0100 -@@ -50,6 +50,9 @@ - #include - #include - #include -+#include -+#include -+ - - static void print_product(FILE *f, struct scsi_inquiry *ip); - int select_target(SCSI *usalp, FILE *f); -@@ -200,7 +203,7 @@ int list_devices(SCSI *usalp, FILE *f, i - int fd, ndevs=0; - struct stat statbuf; - char *lines[MAXDEVCOUNT]; -- char buf[256], perms[8], *p; -+ char buf[256], perms[8]; - - - usalp->silent++; -diff -up cdrkit-1.1.6/wodim/scsi_scan.h.werror cdrkit-1.1.6/wodim/scsi_scan.h ---- cdrkit-1.1.6/wodim/scsi_scan.h.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/wodim/scsi_scan.h 2008-02-25 11:09:02.000000000 +0100 -@@ -39,5 +39,6 @@ - extern int select_target(SCSI *usalp, FILE *f); - extern int list_devices(SCSI *usalp, FILE *f, int pickup_type); - extern SCSI * open_auto(int64_t need_size, int debug, int lverbose); -+extern int scsi_set_streaming(SCSI *usalp, caddr_t addr, int size); - - #endif /* _SCSI_SCAN_H */ -diff -up cdrkit-1.1.6/wodim/isosize.c.werror cdrkit-1.1.6/wodim/isosize.c ---- cdrkit-1.1.6/wodim/isosize.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/wodim/isosize.c 2008-02-25 11:09:02.000000000 +0100 -@@ -69,7 +69,8 @@ isosize(int f) - vp = (struct iso9660_pr_voldesc *) &vd; - - do { -- read(f, &vd, sizeof (vd)); -+ int ret; -+ ret = read(f, &vd, sizeof (vd)); - if (GET_UBYTE(vd.vd_type) == VD_PRIMARY) - break; - -diff -up cdrkit-1.1.6/icedax/toc.c.werror cdrkit-1.1.6/icedax/toc.c ---- cdrkit-1.1.6/icedax/toc.c.werror 2008-02-25 11:09:02.000000000 +0100 -+++ cdrkit-1.1.6/icedax/toc.c 2008-02-25 11:09:02.000000000 +0100 +diff -up cdrkit-1.1.6.new/icedax/toc.c.werror cdrkit-1.1.6.new/icedax/toc.c +--- cdrkit-1.1.6.new/icedax/toc.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/icedax/toc.c 2008-02-27 09:37:52.000000000 +0100 @@ -864,7 +864,7 @@ int process_cddb_titles(int sock_fd, cha int finished = 0; char *p = inbuff; @@ -786,3 +280,518 @@ diff -up cdrkit-1.1.6/icedax/toc.c.werror cdrkit-1.1.6/icedax/toc.c } while (user_choice > nr); if (user_choice == nr) +diff -up cdrkit-1.1.6.new/wodim/scsi_scan.h.werror cdrkit-1.1.6.new/wodim/scsi_scan.h +--- cdrkit-1.1.6.new/wodim/scsi_scan.h.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/wodim/scsi_scan.h 2008-02-27 09:37:52.000000000 +0100 +@@ -39,5 +39,6 @@ + extern int select_target(SCSI *usalp, FILE *f); + extern int list_devices(SCSI *usalp, FILE *f, int pickup_type); + extern SCSI * open_auto(int64_t need_size, int debug, int lverbose); ++extern int scsi_set_streaming(SCSI *usalp, caddr_t addr, int size); + + #endif /* _SCSI_SCAN_H */ +diff -up cdrkit-1.1.6.new/wodim/scsi_cdr.c.werror cdrkit-1.1.6.new/wodim/scsi_cdr.c +--- cdrkit-1.1.6.new/wodim/scsi_cdr.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/wodim/scsi_cdr.c 2008-02-27 09:37:52.000000000 +0100 +@@ -63,6 +63,7 @@ + + #include "scsimmc.h" + #include "wodim.h" ++#include "scsi_scan.h" + + #define strbeg(s1, s2) (strstr((s2), (s1)) == (s2)) + +diff -up cdrkit-1.1.6.new/wodim/wodim.c.werror cdrkit-1.1.6.new/wodim/wodim.c +--- cdrkit-1.1.6.new/wodim/wodim.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/wodim/wodim.c 2008-02-27 09:37:52.000000000 +0100 +@@ -4076,6 +4076,7 @@ audioread(SCSI *usalp, cdr_t *dp, int fl + #ifdef DEBUG + int speed = 1; + int oflags = dp->cdr_cmdflags; ++ int ret; + + dp->cdr_cmdflags &= ~F_DUMMY; + if ((*dp->cdr_set_speed_dummy)(usalp, dp, &speed) < 0) +@@ -4089,7 +4090,7 @@ audioread(SCSI *usalp, cdr_t *dp, int fl + + read_scsi(usalp, buf, 1000, 1); + printf("XXX:\n"); +- write(1, buf, 512); ++ ret = write(1, buf, 512); + unload_media(usalp, dp, flags); + comexit(0); + #endif +diff -up cdrkit-1.1.6.new/wodim/drv_mmc.c.werror cdrkit-1.1.6.new/wodim/drv_mmc.c +--- cdrkit-1.1.6.new/wodim/drv_mmc.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/wodim/drv_mmc.c 2008-02-27 09:37:52.000000000 +0100 +@@ -59,6 +59,7 @@ + #include "scsimmc.h" + #include "mmcvendor.h" + #include "wodim.h" ++#include "scsi_scan.h" + + extern char *driveropts; + +@@ -165,6 +166,8 @@ static int do_tattoo_yamaha(SCSI *usalp + static int yamaha_write_buffer(SCSI *usalp, int mode, int bufferid, long offset, + long parlen, void *buffer, long buflen); + static int dvd_dual_layer_split(SCSI *usalp, cdr_t *dp, long tsize); ++extern int reserve_track(SCSI *usalp, Ulong size); ++extern int scsi_format(SCSI *usalp, caddr_t addr, int size, BOOL background); + + #ifdef __needed__ + static int +@@ -2851,9 +2854,9 @@ extern char *buf; + flush(); + } + if (formattype == FULL_FORMAT) { +- ret = scsi_format(usalp, &addr, sizeof(addr), FALSE); ++ ret = scsi_format(usalp, (caddr_t)&addr, sizeof(addr), FALSE); + } else { +- ret = scsi_format(usalp, &addr, sizeof(addr), TRUE); ++ ret = scsi_format(usalp, (caddr_t)&addr, sizeof(addr), TRUE); + } + if (ret < 0) + return (ret); +diff -up cdrkit-1.1.6.new/wodim/scsi_scan.c.werror cdrkit-1.1.6.new/wodim/scsi_scan.c +--- cdrkit-1.1.6.new/wodim/scsi_scan.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/wodim/scsi_scan.c 2008-02-27 09:37:52.000000000 +0100 +@@ -50,6 +50,9 @@ + #include + #include + #include ++#include ++#include ++ + + static void print_product(FILE *f, struct scsi_inquiry *ip); + int select_target(SCSI *usalp, FILE *f); +@@ -200,7 +203,7 @@ int list_devices(SCSI *usalp, FILE *f, i + int fd, ndevs=0; + struct stat statbuf; + char *lines[MAXDEVCOUNT]; +- char buf[256], perms[8], *p; ++ char buf[256], perms[8]; + + + usalp->silent++; +diff -up cdrkit-1.1.6.new/wodim/isosize.c.werror cdrkit-1.1.6.new/wodim/isosize.c +--- cdrkit-1.1.6.new/wodim/isosize.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/wodim/isosize.c 2008-02-27 09:37:52.000000000 +0100 +@@ -69,7 +69,8 @@ isosize(int f) + vp = (struct iso9660_pr_voldesc *) &vd; + + do { +- read(f, &vd, sizeof (vd)); ++ int ret; ++ ret = read(f, &vd, sizeof (vd)); + if (GET_UBYTE(vd.vd_type) == VD_PRIMARY) + break; + +diff -up cdrkit-1.1.6.new/genisoimage/jte.c.werror cdrkit-1.1.6.new/genisoimage/jte.c +--- cdrkit-1.1.6.new/genisoimage/jte.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/genisoimage/jte.c 2008-02-27 09:37:52.000000000 +0100 +@@ -531,13 +531,13 @@ static void parse_md5_list(void) + } + + memset(buf, 0, sizeof(buf)); +- while (fgets(buf, sizeof(buf), md5_file)) ++ while (fgets((char *)buf, sizeof(buf), md5_file)) + { + numbuf = &buf[34]; +- filename = &buf[48]; ++ filename = (char *)&buf[48]; + /* Lose the trailing \n from the fgets() call */ +- if (buf[strlen(buf)-1] == '\n') +- buf[strlen(buf)-1] = 0; ++ if (buf[strlen((char *)buf)-1] == '\n') ++ buf[strlen((char *)buf)-1] = 0; + + if (mk_MD5Parse(buf, md5)) + { +@@ -849,7 +849,7 @@ void write_jt_footer(void) + /* And calculate the image size */ + image_size = (unsigned long long)SECTOR_SIZE * last_extent_written; + +- write_template_desc_entries(image_size, md5); ++ write_template_desc_entries(image_size, (char *)md5); + + write_jigdo_file(); + } +@@ -989,8 +989,8 @@ void write_jt_match_record(char *filenam + #endif + } + if (first_block) +- rsync64_sum = rsync64(buf, MIN_JIGDO_FILE_SIZE); +- mk_MD5Update(&iso_context, buf, use); ++ rsync64_sum = rsync64((unsigned char *)buf, MIN_JIGDO_FILE_SIZE); ++ mk_MD5Update(&iso_context, (unsigned char *)buf, use); + remain -= use; + first_block = 0; + } +@@ -1002,14 +1002,14 @@ void write_jt_match_record(char *filenam + { + int pad_size = sector_size - (size % sector_size); + memset(buf, 0, pad_size); +- mk_MD5Update(&iso_context, buf, pad_size); ++ mk_MD5Update(&iso_context, (unsigned char *)buf, pad_size); + } + + add_file_entry(mirror_name, size, &md5[0], rsync64_sum); + if (size % sector_size) + { + int pad_size = sector_size - (size % sector_size); +- write_compressed_chunk(buf, pad_size); ++ write_compressed_chunk((unsigned char *)buf, pad_size); + add_unmatched_entry(pad_size); + } + } +diff -up cdrkit-1.1.6.new/genisoimage/boot-mips.c.werror cdrkit-1.1.6.new/genisoimage/boot-mips.c +--- cdrkit-1.1.6.new/genisoimage/boot-mips.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/genisoimage/boot-mips.c 2008-02-27 09:37:52.000000000 +0100 +@@ -310,7 +310,7 @@ static int boot_mips_write(FILE *outfile + length = ((get_733(boot_file->isorec.size) + 2047) / 2048) * 2048; + filename = file_base_name(boot_mips_filename[i]); + +- strncpy(vh.vh_vd[i].vd_name, filename, MIN(VDNAMESIZE, strlen(filename))); ++ strncpy((char *)vh.vh_vd[i].vd_name, filename, MIN(VDNAMESIZE, strlen(filename))); + write_be32(extent, (unsigned char *)&vh.vh_vd[i].vd_lbn); + write_be32(length, (unsigned char *)&vh.vh_vd[i].vd_nbytes); + +diff -up cdrkit-1.1.6.new/genisoimage/tree.c.werror cdrkit-1.1.6.new/genisoimage/tree.c +--- cdrkit-1.1.6.new/genisoimage/tree.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/genisoimage/tree.c 2008-02-27 09:37:52.000000000 +0100 +@@ -41,6 +41,7 @@ + #include + #include "genisoimage.h" + #include "match.h" ++#include "udf.h" + #include "exclude.h" + #include + #include +diff -up cdrkit-1.1.6.new/genisoimage/multi.c.werror cdrkit-1.1.6.new/genisoimage/multi.c +--- cdrkit-1.1.6.new/genisoimage/multi.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/genisoimage/multi.c 2008-02-27 09:37:52.000000000 +0100 +@@ -1064,7 +1064,7 @@ check_prev_session(struct directory_entr + } + /* We found it and we can reuse the extent */ + memcpy(curr_entry->isorec.extent, ptr[i]->isorec.extent, 8); +- curr_entry->starting_block = isonum_733(ptr[i]->isorec.extent); ++ curr_entry->starting_block = isonum_733((unsigned char *)ptr[i]->isorec.extent); + curr_entry->de_flags |= SAFE_TO_REUSE_TABLE_ENTRY; + goto found_it; + } +diff -up cdrkit-1.1.6.new/genisoimage/genisoimage.c.werror cdrkit-1.1.6.new/genisoimage/genisoimage.c +--- cdrkit-1.1.6.new/genisoimage/genisoimage.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/genisoimage/genisoimage.c 2008-02-27 09:37:52.000000000 +0100 +@@ -2451,8 +2451,8 @@ parse_input_files: + if (stream_filename) { + if (strlen(stream_filename) > MAX_ISONAME) + comerrno(EX_BAD, +- "stream-file-name too long (%d), max is %d.\n", +- strlen(stream_filename), MAX_ISONAME); ++ "stream-file-name too long (%d), max is %d.\n", ++ (int)strlen(stream_filename), (int)MAX_ISONAME); + if (strchr(stream_filename, '/')) + comerrno(EX_BAD, "Illegal character '/' in stream-file-name.\n"); + iso9660_level = 4; +diff -up cdrkit-1.1.6.new/genisoimage/eltorito.c.werror cdrkit-1.1.6.new/genisoimage/eltorito.c +--- cdrkit-1.1.6.new/genisoimage/eltorito.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/genisoimage/eltorito.c 2008-02-27 09:37:52.000000000 +0100 +@@ -600,7 +600,7 @@ fill_boot_desc(struct eltorito_defaultbo + static char csum_buffer[SECTOR_SIZE]; + int len; + struct genisoimage_boot_info bi_table; +- ++ int ret; + bootimage = open(de->whole_name, O_RDWR | O_BINARY); + if (bootimage == -1) { + #ifdef USE_LIBSCHILY +@@ -661,7 +661,7 @@ fill_boot_desc(struct eltorito_defaultbo + set_731(bi_table.bi_length, de->size); + set_731(bi_table.bi_csum, bi_checksum); + +- write(bootimage, &bi_table, sizeof (bi_table)); ++ ret = write(bootimage, &bi_table, sizeof (bi_table)); + close(bootimage); + } + }/* fill_boot_desc(... */ +diff -up cdrkit-1.1.6.new/genisoimage/boot-hppa.c.werror cdrkit-1.1.6.new/genisoimage/boot-hppa.c +--- cdrkit-1.1.6.new/genisoimage/boot-hppa.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/genisoimage/boot-hppa.c 2008-02-27 09:37:52.000000000 +0100 +@@ -177,7 +177,7 @@ static int boot_hppa_write(FILE *outfile + write_be32(length, &boot_sector[20]); + + /* Now the commandline */ +- snprintf(&boot_sector[24], 127, "%s", hppa_cmdline); ++ snprintf((char *)&boot_sector[24], 127, "%s", hppa_cmdline); + + /* Find the dir entry for the 64-bit kernel by walking our file list */ + boot_file = search_tree_file(root, hppa_kernel_64); +diff -up cdrkit-1.1.6.new/genisoimage/joliet.c.werror cdrkit-1.1.6.new/genisoimage/joliet.c +--- cdrkit-1.1.6.new/genisoimage/joliet.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/genisoimage/joliet.c 2008-02-27 09:38:18.000000000 +0100 +@@ -97,6 +97,7 @@ + #include + #include /* For UNICODE translation */ + #include ++#include + + #ifdef USE_ICONV + #include +@@ -250,9 +251,9 @@ convert_to_unicode(unsigned char *buffer + #ifdef USE_ICONV + if (inls->iconv_d && inls->unls_cs2uni==NULL && + inls->unls_uni2cs==NULL) { +- char *inptr = tmpbuf; +- char *outptr = buffer; +- size_t inleft = strlen(tmpbuf); ++ char *inptr = (char *)tmpbuf; ++ char *outptr = (char *)buffer; ++ size_t inleft = strlen((char *)tmpbuf); + size_t inlen = inleft; + size_t outleft = size; + +diff -up cdrkit-1.1.6.new/genisoimage/md5.c.werror cdrkit-1.1.6.new/genisoimage/md5.c +--- cdrkit-1.1.6.new/genisoimage/md5.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/genisoimage/md5.c 2008-02-27 09:37:52.000000000 +0100 +@@ -352,15 +352,15 @@ int calculate_md5sum(char *filename, uns + remain = size; + while (remain > 0) + { +- use = (remain > sizeof(buffer) ? sizeof(buffer) : remain); +- if (fread(buffer, 1, use, infile) == 0) ++ use = (remain > sizeof(buffer) ? sizeof(buffer) : remain); ++ if (fread(buffer, 1, use, infile) == 0) + { +- fprintf(stderr, "cannot read from '%s'\n", filename); +- exit(1); +- } +- /* Update the checksum */ +- mk_MD5Update(&file_context, buffer, use); +- remain -= use; ++ fprintf(stderr, "cannot read from '%s'\n", filename); ++ exit(1); ++ } ++ /* Update the checksum */ ++ mk_MD5Update(&file_context, (unsigned char *)buffer, use); ++ remain -= use; + } + fclose(infile); + mk_MD5Final(&out[0], &file_context); +diff -up cdrkit-1.1.6.new/genisoimage/diag/isovfy.c.werror cdrkit-1.1.6.new/genisoimage/diag/isovfy.c +--- cdrkit-1.1.6.new/genisoimage/diag/isovfy.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/genisoimage/diag/isovfy.c 2008-02-27 09:37:52.000000000 +0100 +@@ -583,6 +583,7 @@ check_path_tables(int typel_extent, int + char *pnt; + char *typel; + char *typem; ++ int ret; + + /* Now read in the path tables */ + +@@ -591,11 +592,11 @@ check_path_tables(int typel_extent, int + readsecs(typel_extent * blocksize / 2048, typel, ISO_BLOCKS(path_table_size)); + #else + lseek(fileno(infile), (off_t)((off_t)typel_extent) * blocksize, SEEK_SET); +- read(fileno(infile), typel, path_table_size); ++ ret = read(fileno(infile), typel, path_table_size); + #endif + typem = (char *) malloc(path_table_size); + lseek(fileno(infile), (off_t)((off_t)typem_extent) * blocksize, SEEK_SET); +- read(fileno(infile), typem, path_table_size); ++ ret = read(fileno(infile), typem, path_table_size); + + j = path_table_size; + pnt = typel; +diff -up cdrkit-1.1.6.new/genisoimage/diag/isodump.c.werror cdrkit-1.1.6.new/genisoimage/diag/isodump.c +--- cdrkit-1.1.6.new/genisoimage/diag/isodump.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/genisoimage/diag/isodump.c 2008-02-27 09:37:52.000000000 +0100 +@@ -652,10 +652,11 @@ main(int argc, char *argv[]) + on_comerr((void(*)(int, void *))reset_tty, NULL); + + do { ++ int ret; + if (file_addr < 0) + file_addr = (off_t)0; + showblock(1); +- read(STDIN_FILENO, &c, 1); ++ ret = read(STDIN_FILENO, &c, 1); + if (c == 'a') + file_addr -= blocksize; + if (c == 'b') +@@ -665,11 +666,11 @@ main(int argc, char *argv[]) + printf("Enter new starting block (in hex):"); + if (sizeof (file_addr) > sizeof (long)) { + Llong ll; +- scanf("%llx", &ll); ++ ret = scanf("%llx", &ll); + file_addr = (off_t)ll; + } else { + long l; +- scanf("%lx", &l); ++ ret = scanf("%lx", &l); + file_addr = (off_t)l; + } + file_addr = file_addr * blocksize; +@@ -677,9 +678,10 @@ main(int argc, char *argv[]) + printf(" "); + } + if (c == 'f') { ++ char *ret; + crsr2(20, 1); + printf("Enter new search string:"); +- fgets((char *)search, sizeof (search), stdin); ++ ret = fgets((char *)search, sizeof (search), stdin); + while (search[strlen((char *)search)-1] == '\n') + search[strlen((char *)search)-1] = 0; + crsr2(20, 1); +diff -up cdrkit-1.1.6.new/genisoimage/diag/isoinfo.c.werror cdrkit-1.1.6.new/genisoimage/diag/isoinfo.c +--- cdrkit-1.1.6.new/genisoimage/diag/isoinfo.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/genisoimage/diag/isoinfo.c 2008-02-27 09:37:52.000000000 +0100 +@@ -641,6 +641,7 @@ extract_file(struct iso_directory_record + len = isonum_733((unsigned char *)idr->size); + + while (len > 0) { ++ int ret; + #ifdef USE_SCG + readsecs(extent - sector_offset, buff, ISO_BLOCKS(sizeof (buff))); + tlen = (len > sizeof (buff) ? sizeof (buff) : len); +@@ -651,7 +652,7 @@ extract_file(struct iso_directory_record + #endif + len -= tlen; + extent++; +- write(STDOUT_FILENO, buff, tlen); ++ ret = write(STDOUT_FILENO, buff, tlen); + } + } + +diff -up cdrkit-1.1.6.new/genisoimage/diag/dump.c.werror cdrkit-1.1.6.new/genisoimage/diag/dump.c +--- cdrkit-1.1.6.new/genisoimage/diag/dump.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/genisoimage/diag/dump.c 2008-02-27 09:37:52.000000000 +0100 +@@ -366,9 +366,10 @@ main(int argc, char *argv[]) + on_comerr((void(*)(int, void *))reset_tty, NULL); + + do { ++ int ret; + if (file_addr < (off_t)0) file_addr = (off_t)0; + showblock(1); +- read(STDIN_FILENO, &c, 1); ++ ret = read(STDIN_FILENO, &c, 1); + if (c == 'a') + file_addr -= PAGE; + if (c == 'b') +@@ -378,11 +379,11 @@ main(int argc, char *argv[]) + printf("Enter new starting block (in hex):"); + if (sizeof (file_addr) > sizeof (long)) { + Llong ll; +- scanf("%llx", &ll); ++ ret = scanf("%llx", &ll); + file_addr = (off_t)ll; + } else { + long l; +- scanf("%lx", &l); ++ ret = scanf("%lx", &l); + file_addr = (off_t)l; + } + file_addr = file_addr << 11; +@@ -390,9 +391,10 @@ main(int argc, char *argv[]) + printf(" "); + } + if (c == 'f') { ++ char *ret; + crsr2(20, 1); + printf("Enter new search string:"); +- fgets((char *)search, sizeof (search), stdin); ++ ret = fgets((char *)search, sizeof (search), stdin); + while (search[strlen((char *)search)-1] == '\n') + search[strlen((char *)search)-1] = 0; + crsr2(20, 1); +diff -up cdrkit-1.1.6.new/genisoimage/write.c.werror cdrkit-1.1.6.new/genisoimage/write.c +--- cdrkit-1.1.6.new/genisoimage/write.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/genisoimage/write.c 2008-02-27 09:47:37.000000000 +0100 +@@ -303,7 +303,8 @@ xfwrite(void *buffer, int size, int coun + * which is wrong this code. (void *) introduces a compatible + * intermediate type in the cast list. + */ +- count -= got, *(char **)(void *)&buffer += size * got; ++ count -= got; ++ buffer = (void *)(((char *)buffer) + size * got); + } + } + +@@ -917,9 +918,9 @@ reassign_link_addresses(struct directory + } + + if (verbose > 2 && s_entry->size != 0) { +- fprintf(stderr, "%8d %8d ", ++ fprintf(stderr, "%8u %8u ", + s_entry->starting_block, +- s_entry->starting_block + ISO_BLOCKS(s_entry->size) - 1); ++ (unsigned int)(s_entry->starting_block + ISO_BLOCKS(s_entry->size) - 1)); + + if (s_entry->inode != TABLE_INODE) { + fprintf(stderr, "%s\n", s_entry->whole_name); +diff -up cdrkit-1.1.6.new/librols/fexec.c.werror cdrkit-1.1.6.new/librols/fexec.c +--- cdrkit-1.1.6.new/librols/fexec.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/librols/fexec.c 2008-02-27 09:37:52.000000000 +0100 +@@ -204,6 +204,8 @@ fexecve(name, in, out, err, av, env) + int o[3]; + int f[3]; + int errsav; ++ ++ o[0] = o[1] = o[2] = f[0] = f[1] = f[2] = 0; + #endif + + fflush(out); +diff -up cdrkit-1.1.6.new/librols/default.c.werror cdrkit-1.1.6.new/librols/default.c +--- cdrkit-1.1.6.new/librols/default.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/librols/default.c 2008-02-27 09:37:52.000000000 +0100 +@@ -56,7 +56,7 @@ static char *get_value(FILE *srcfile, co + next_line: + while(fgets(linebuf, sizeof(linebuf)-1, srcfile)) { + int i; +- int keybeg; ++ int keybeg=0; + int s=KEYBEGINSEARCH; + char *ret=NULL; + int lastchar=0; +diff -up cdrkit-1.1.6.new/librols/raisecond.c.werror cdrkit-1.1.6.new/librols/raisecond.c +--- cdrkit-1.1.6.new/librols/raisecond.c.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/librols/raisecond.c 2008-02-27 09:37:52.000000000 +0100 +@@ -58,8 +58,8 @@ + #ifndef STDERR_FILENO + #define STDERR_FILENO 2 + #endif +-#define eprints(a) (void)write(STDERR_FILENO, (a), sizeof (a)-1) +-#define eprintl(a) (void)write(STDERR_FILENO, (a), strlen(a)) ++#define eprints(a) write(STDERR_FILENO, (a), sizeof (a)-1) ++#define eprintl(a) write(STDERR_FILENO, (a), strlen(a)) + + #define is_even(p) ((((long)(p)) & 1) == 0) + #define even(p) (((long)(p)) & ~1L) +@@ -173,7 +173,8 @@ LOCAL void + raiseabort(signame) + const char *signame; + { +- eprints("Condition not caught: "); eprintl(signame); eprints(".\n"); ++ int a; ++ a=eprints("Condition not caught: "); a=eprintl(signame); a=eprints(".\n"); + abort(); + /* NOTREACHED */ + } +diff -up cdrkit-1.1.6.new/include/libport.h.werror cdrkit-1.1.6.new/include/libport.h +--- cdrkit-1.1.6.new/include/libport.h.werror 2008-02-27 09:37:52.000000000 +0100 ++++ cdrkit-1.1.6.new/include/libport.h 2008-02-27 09:37:52.000000000 +0100 +@@ -67,9 +67,11 @@ + /* Linux MAXHOSTNAMELEN */ + #endif + #ifdef MAXHOSTNAMELEN ++#ifndef HOST_NAME_MAX + #define HOST_NAME_MAX MAXHOSTNAMELEN + #endif + #endif ++#endif + + #ifndef HOST_NAME_MAX + #define HOST_NAME_MAX 255 diff --git a/cdrkit.spec b/cdrkit.spec index b23ee56..291c824 100644 --- a/cdrkit.spec +++ b/cdrkit.spec @@ -1,7 +1,7 @@ Summary: A collection of CD/DVD utilities Name: cdrkit Version: 1.1.6 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv2 Group: Applications/System URL: http://cdrkit.org/ @@ -213,6 +213,9 @@ fi %{_mandir}/man1/readmult.* %changelog +* Wed Feb 27 2008 Harald Hoyer 1.1.6-11 +- refined -Werror patch + * Mon Feb 25 2008 Harald Hoyer 1.1.6-10 - patched to compile with -Werror (rhbz#429385)