diff --git a/cdrkit-1.1.6-werror.patch b/cdrkit-1.1.6-werror.patch new file mode 100644 index 0000000..db45547 --- /dev/null +++ b/cdrkit-1.1.6-werror.patch @@ -0,0 +1,744 @@ +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 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/libhfs_iso/hfs.h 2008-02-25 10:03: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 + + #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 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/libhfs_iso/hfs.c 2008-02-25 10:03:52.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/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 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/libusal/usal/usalops.h 2008-02-25 10:03: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/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 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/libusal/scsi-linux-ata.c 2008-02-25 10:03:52.000000000 +0100 +@@ -258,7 +258,7 @@ openbydev: + starget, + slun; + +- f = sg_open_excl(device, O_RDONLY | O_NONBLOCK); ++ f = sg_open_excl(device, O_RDONLY | O_NONBLOCK, FALSE); + + if (f < 0) { + if (usalp->errstr) +@@ -770,11 +770,11 @@ sg_amapdev(SCSI *usalp, int f, char *dev + l = 0; + #endif /* nonono */ + /* other solution, with ioctl */ +- int Chan, +- Ino, +- Bus, +- Target, +- Lun; ++ int Chan = 0, ++ Ino = 0, ++ Bus = 0, ++ Target = 0, ++ Lun = 0; + + subsystem = HOST_SCSI; + sg_amapdev_scsi(usalp, f, &Bus, &Target, &Lun, &Chan, &Ino); +@@ -1008,7 +1008,7 @@ usalo_asend(SCSI *usalp) + } + + sg_cgc.buflen = sp->size; +- sg_cgc.buffer = sp->addr; ++ sg_cgc.buffer = (unsigned char *)sp->addr; + + 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 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/libusal/scsi-linux-sg.c 2008-02-25 10:03:52.000000000 +0100 +@@ -217,13 +217,6 @@ struct usal_local { + /*#define MISALIGN*/ + /*#undef SG_GET_BUFSIZE*/ + +-#if defined(USE_PG) && !defined(USE_PG_ONLY) +-#include "scsi-linux-pg.c" +-#endif +-#ifdef USE_OLD_ATAPI +-#include "scsi-linux-ata.c" +-#endif +- + + #ifdef MISALIGN + static int sg_getint(int *ip); +@@ -246,8 +239,14 @@ static void sg_settimeout(int f, int tim + + int sg_open_excl(char *device, int mode, BOOL beQuiet); + + static BOOL get_max_secs(char *dirpath, int *outval); + ++#if defined(USE_PG) && !defined(USE_PG_ONLY) ++#include "scsi-linux-pg.c" ++#endif ++#ifdef USE_OLD_ATAPI ++#include "scsi-linux-ata.c" ++#endif + + BOOL check_linux_26() { + int gen, tmp; +@@ -511,10 +508,9 @@ usalo_open(SCSI *usalp, char *device) + #define SCD 1 + #define SG 2 + int h; +-retry_scan_open: + for(h=HDX; h <= (fake_atabus ? HDX : SG) ; h++) { +- char *pattern; +- unsigned int first, last; ++ char *pattern = NULL; ++ unsigned int first = 0, last = 0; + switch(h) { + case(HDX): + { +@@ -792,7 +788,7 @@ sg_initdev(SCSI *usalp, int f) + for (i = 0; i < 1000; i++) { /* Read at least 32k from /dev/sg* */ + int ret; + +- ret = read(f, &sg_rep, sizeof (sg_rep)); ++ ret = read(f, &sg_rep, sizeof (struct sg_rep)); + if (ret > 0) + continue; + if (ret == 0 || errno == EAGAIN || errno == EIO) +@@ -984,12 +980,14 @@ sg_raisedma(SCSI *usalp, long newmax) + } + #endif + +-static void freadstring(char *fn, char *out, int len) { ++static char *freadstring(char *fn, char *out, int len) { ++ char *ret; + FILE *fd=fopen(fn, "r"); + out[0]='\0'; +- if(!fd) return; +- fgets(out, len, fd); ++ if(!fd) return NULL; ++ ret = fgets(out, len, fd); + fclose(fd); ++ return ret; + } + + static long +@@ -1017,14 +1015,13 @@ usalo_maxdma(SCSI *usalp, long amt) + major=stbuf.st_rdev>>8; + minor=stbuf.st_rdev&0xFF; + if (usalp->debug > 0) +- fprintf(stderr, "Looking for data for major:minor: %d:%d\n", major, minor); ++ fprintf(stderr, "Looking for data for major:minor: %ld:%ld\n", major, minor); + glob_t globbuf; + memset(&globbuf, 0, sizeof(glob_t)); + /* *dev files contain the major:minor strings to compare */ + glob("/sys/class/scsi_generic/*/device/block*/queue/max_sectors_kb", GLOB_DOOFFS | GLOB_NOSORT, NULL, &globbuf); + glob("/sys/block/*/device/block*/queue/max_sectors_kb", GLOB_DOOFFS | GLOB_NOSORT | GLOB_APPEND, NULL, &globbuf); + for(i=0;isense.code >= 0x70) */ +- return (char *) &(cp->sense); ++ return (unsigned char *) &(cp->sense); + } + + +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 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/icedax/toc.c 2008-02-25 10:03:52.000000000 +0100 +@@ -864,7 +864,7 @@ int process_cddb_titles(int sock_fd, cha + int finished = 0; + char *p = inbuff; + int ind = 0; +- char ** target = (char **)&global.creator; ++ unsigned char ** target = &global.creator; + + do { + while (readbytes > 0) { +@@ -935,7 +935,7 @@ int process_cddb_titles(int sock_fd, cha + if (*target != NULL) + **target = '\0'; + } else { +- *target = realloc(*target, strlen(*target) + clen - 1); ++ *target = realloc(*target, strlen((char *)*target) + clen - 1); + } + if (*target != NULL) { + strcat((char *)*target, inbuff+ind+7); +@@ -943,7 +943,7 @@ int process_cddb_titles(int sock_fd, cha + + /* handle part after the delimiter, if present */ + if (res != NULL) { +- target = (char **)&global.disctitle; ++ target = (unsigned char **)&global.disctitle; + /* skip the delimiter */ + q += 3; + clen = p - q; +@@ -1070,8 +1070,9 @@ static int handle_userchoice(char *p, un + + /* get user response. */ + do { ++ int ret; + fprintf(stderr, "please choose one (0-%u): ", nr); +- scanf("%u", &user_choice); ++ ret = scanf("%u", &user_choice); + } while (user_choice > nr); + + if (user_choice == nr) +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 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/wodim/scsi_scan.h 2008-02-25 10:03: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/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 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/wodim/scsi_cdr.c 2008-02-25 10:03: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/wodim/wodim.c.werror cdrkit-1.1.6/wodim/wodim.c +--- cdrkit-1.1.6/wodim/wodim.c.werror 2008-02-25 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/wodim/wodim.c 2008-02-25 10:03: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/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 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/wodim/drv_mmc.c 2008-02-25 10:03: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/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 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/wodim/scsi_scan.c 2008-02-25 10:03: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/wodim/isosize.c.werror cdrkit-1.1.6/wodim/isosize.c +--- cdrkit-1.1.6/wodim/isosize.c.werror 2008-02-25 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/wodim/isosize.c 2008-02-25 10:03: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/genisoimage/jte.c.werror cdrkit-1.1.6/genisoimage/jte.c +--- cdrkit-1.1.6/genisoimage/jte.c.werror 2008-02-25 10:06:16.000000000 +0100 ++++ cdrkit-1.1.6/genisoimage/jte.c 2008-02-25 10:08:08.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/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 10:04:55.000000000 +0100 ++++ cdrkit-1.1.6/genisoimage/boot-mips.c 2008-02-25 10:05:05.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/genisoimage/tree.c.werror cdrkit-1.1.6/genisoimage/tree.c +--- cdrkit-1.1.6/genisoimage/tree.c.werror 2008-02-25 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/genisoimage/tree.c 2008-02-25 10:03: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/genisoimage/multi.c.werror cdrkit-1.1.6/genisoimage/multi.c +--- cdrkit-1.1.6/genisoimage/multi.c.werror 2008-02-25 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/genisoimage/multi.c 2008-02-25 10:03: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/genisoimage/genisoimage.c.werror cdrkit-1.1.6/genisoimage/genisoimage.c +--- cdrkit-1.1.6/genisoimage/genisoimage.c.werror 2008-02-25 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/genisoimage/genisoimage.c 2008-02-25 10:03: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/genisoimage/eltorito.c.werror cdrkit-1.1.6/genisoimage/eltorito.c +--- cdrkit-1.1.6/genisoimage/eltorito.c.werror 2008-02-25 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/genisoimage/eltorito.c 2008-02-25 10:03: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/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 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/genisoimage/boot-hppa.c 2008-02-25 10:03: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/genisoimage/joliet.c.werror cdrkit-1.1.6/genisoimage/joliet.c +--- cdrkit-1.1.6/genisoimage/joliet.c.werror 2008-02-25 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/genisoimage/joliet.c 2008-02-25 10:03:52.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/md5.c.werror cdrkit-1.1.6/genisoimage/md5.c +--- cdrkit-1.1.6/genisoimage/md5.c.werror 2008-02-25 10:05:15.000000000 +0100 ++++ cdrkit-1.1.6/genisoimage/md5.c 2008-02-25 10:06:07.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/diag/isovfy.c.werror cdrkit-1.1.6/genisoimage/diag/isovfy.c +--- cdrkit-1.1.6/genisoimage/diag/isovfy.c.werror 2008-02-25 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/genisoimage/diag/isovfy.c 2008-02-25 10:03: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/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 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/genisoimage/diag/isodump.c 2008-02-25 10:03: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/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 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/genisoimage/diag/isoinfo.c 2008-02-25 10:03: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/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 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/genisoimage/diag/dump.c 2008-02-25 10:03: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/genisoimage/write.c.werror cdrkit-1.1.6/genisoimage/write.c +--- cdrkit-1.1.6/genisoimage/write.c.werror 2008-02-25 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/genisoimage/write.c 2008-02-25 10:03:52.000000000 +0100 +@@ -918,8 +918,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/librols/fexec.c.werror cdrkit-1.1.6/librols/fexec.c +--- cdrkit-1.1.6/librols/fexec.c.werror 2008-02-25 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/librols/fexec.c 2008-02-25 10:03: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/librols/default.c.werror cdrkit-1.1.6/librols/default.c +--- cdrkit-1.1.6/librols/default.c.werror 2008-02-25 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/librols/default.c 2008-02-25 10:03: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/librols/raisecond.c.werror cdrkit-1.1.6/librols/raisecond.c +--- cdrkit-1.1.6/librols/raisecond.c.werror 2008-02-25 10:03:52.000000000 +0100 ++++ cdrkit-1.1.6/librols/raisecond.c 2008-02-25 10:03: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 */ + }