cdrkit/cdrkit-1.1.6-werror.patch
2008-02-27 09:46:01 +00:00

750 lines
28 KiB
Diff

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 2006-10-12 21:38:29.000000000 +0200
+++ cdrkit-1.1.6/libhfs_iso/hfs.h 2008-02-27 10:09:20.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 <timedefs.h>
#include <standard.h>
@@ -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 2006-12-08 14:38:43.000000000 +0100
+++ cdrkit-1.1.6/libhfs_iso/hfs.c 2008-02-27 10:09:20.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 2007-04-10 17:01:46.000000000 +0200
+++ cdrkit-1.1.6/libusal/usal/usalops.h 2008-02-27 10:09:20.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 2006-12-08 14:38:43.000000000 +0100
+++ cdrkit-1.1.6/libusal/scsi-linux-ata.c 2008-02-27 10:09:20.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-27 10:09:20.000000000 +0100
+++ cdrkit-1.1.6/libusal/scsi-linux-sg.c 2008-02-27 10:12:27.000000000 +0100
@@ -181,7 +181,7 @@ typedef struct {
struct usal_local {
int usalfile; /* Used for SG_GET_BUFSIZE ioctl()*/
short usalfiles[MAX_SCG][MAX_TGT][MAX_LUN];
- char *filenames[MAX_SCG][MAX_TGT][MAX_LUN];
+ char *filenames[MAX_SCG][MAX_TGT][MAX_LUN];
short buscookies[MAX_SCG];
int pgbus;
int pack_id; /* Should be a random number */
@@ -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);
@@ -248,6 +241,12 @@ int sg_open_excl(char *device, int mo
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;
@@ -465,9 +464,10 @@ usalo_open(SCSI *usalp, char *device)
for (b = 0; b < MAX_SCG; b++) {
usallocal(usalp)->buscookies[b] = (short)-1;
for (t = 0; t < MAX_TGT; t++) {
- for (l = 0; l < MAX_LUN; l++)
+ for (l = 0; l < MAX_LUN; l++) {
usallocal(usalp)->usalfiles[b][t][l] = (short)-1;
usallocal(usalp)->filenames[b][t][l] = NULL;
+ }
}
}
}
@@ -511,10 +511,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 +791,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 +983,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 +1018,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;i<globbuf.gl_pathc; i++) {
- FILE *fd;
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 2006-12-08 14:38:43.000000000 +0100
+++ cdrkit-1.1.6/libusal/scsierrs.c 2008-02-27 10:09:20.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 *,
struct scsi_status *, int);
+#if 0
/*
* Map old non extended sense to sense key.
*/
@@ -67,6 +68,7 @@ static Uchar sd_adaptec_keys[] = {
6, 6, 6, 5, 4,11,11,11 /* 0x28-0x2f */
};
#define MAX_ADAPTEC_KEYS (sizeof (sd_adaptec_keys))
+#endif
/*
* Deviations to CCS found on old pre CCS devices
@@ -667,6 +669,7 @@ static char *sd_sense_keys[] = {
"Reserved" /* 0x0f */
};
+#if 0
static char *sd_cmds[] = {
"\000test unit ready", /* 0x00 */
"\001rezero", /* 0x01 */
@@ -687,6 +690,8 @@ static char *sd_cmds[] = {
"\067read defect data", /* 0x37 */
NULL
};
+#endif
+
const char *
usal_sensemsg(register int ctype, register int code, register int qual,
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 2007-04-09 00:09:51.000000000 +0200
+++ cdrkit-1.1.6/libusal/scsitransp.c 2008-02-27 10:09:20.000000000 +0100
@@ -1154,7 +1154,7 @@ usal_sense_table(SCSI *usalp)
return (0);
/* if (cp->sense.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 2007-01-06 04:19:16.000000000 +0100
+++ cdrkit-1.1.6/icedax/toc.c 2008-02-27 10:09:20.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;
@@ -1071,7 +1071,7 @@ static int handle_userchoice(char *p, un
/* get user response. */
do {
fprintf(stderr, "please choose one (0-%u): ", nr);
- scanf("%u", &user_choice);
+ do{int ret; ret=scanf("%u", &user_choice);}while(0); /* FIXME: check return value */
} 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 2007-05-04 02:45:51.000000000 +0200
+++ cdrkit-1.1.6/wodim/scsi_scan.h 2008-02-27 10:09:20.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 2006-12-29 16:07:44.000000000 +0100
+++ cdrkit-1.1.6/wodim/scsi_cdr.c 2008-02-27 10:09:20.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-27 10:09:20.000000000 +0100
+++ cdrkit-1.1.6/wodim/wodim.c 2008-02-27 10:09:20.000000000 +0100
@@ -4089,7 +4089,7 @@ audioread(SCSI *usalp, cdr_t *dp, int fl
read_scsi(usalp, buf, 1000, 1);
printf("XXX:\n");
- write(1, buf, 512);
+ do{int ret; ret=write(1, buf, 512);}while(0); /* FIXME: handle return value */
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 2007-05-06 12:23:54.000000000 +0200
+++ cdrkit-1.1.6/wodim/drv_mmc.c 2008-02-27 10:09:20.000000000 +0100
@@ -59,6 +59,7 @@
#include "scsimmc.h"
#include "mmcvendor.h"
#include "wodim.h"
+#include "scsi_scan.h"
extern char *driveropts;
@@ -166,6 +167,9 @@ static int yamaha_write_buffer(SCSI *us
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); /* FIXME */
+extern int scsi_format(SCSI *usalp, caddr_t addr, int size, BOOL background); /* FIXME */
+
#ifdef __needed__
static int
mmc_load(SCSI *usalp, cdr_t *dp)
@@ -2851,9 +2855,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 2007-05-04 09:31:20.000000000 +0200
+++ cdrkit-1.1.6/wodim/scsi_scan.c 2008-02-27 10:09:20.000000000 +0100
@@ -50,6 +50,9 @@
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
+#include <ctype.h>
+#include <stdlib.h>
+
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 2006-12-08 14:38:43.000000000 +0100
+++ cdrkit-1.1.6/wodim/isosize.c 2008-02-27 10:09:20.000000000 +0100
@@ -69,7 +69,7 @@ isosize(int f)
vp = (struct iso9660_pr_voldesc *) &vd;
do {
- read(f, &vd, sizeof (vd));
+ do{int ret; ret=read(f, &vd, sizeof (vd));}while(0); /* FIXME: check return value */
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/genisoimage/boot-mips.c.werror cdrkit-1.1.6/genisoimage/boot-mips.c
--- cdrkit-1.1.6/genisoimage/boot-mips.c.werror 2006-11-23 23:11:41.000000000 +0100
+++ cdrkit-1.1.6/genisoimage/boot-mips.c 2008-02-27 10:09:20.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-27 10:09:20.000000000 +0100
+++ cdrkit-1.1.6/genisoimage/tree.c 2008-02-27 10:09:20.000000000 +0100
@@ -41,6 +41,7 @@
#include <mconfig.h>
#include "genisoimage.h"
#include "match.h"
+#include "udf.h"
#include "exclude.h"
#include <timedefs.h>
#include <errno.h>
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 2007-03-14 22:14:33.000000000 +0100
+++ cdrkit-1.1.6/genisoimage/multi.c 2008-02-27 10:09:20.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 2007-03-17 12:59:16.000000000 +0100
+++ cdrkit-1.1.6/genisoimage/genisoimage.c 2008-02-27 10:09:20.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 2007-05-03 12:01:20.000000000 +0200
+++ cdrkit-1.1.6/genisoimage/eltorito.c 2008-02-27 10:09:20.000000000 +0100
@@ -600,7 +600,6 @@ fill_boot_desc(struct eltorito_defaultbo
static char csum_buffer[SECTOR_SIZE];
int len;
struct genisoimage_boot_info bi_table;
-
bootimage = open(de->whole_name, O_RDWR | O_BINARY);
if (bootimage == -1) {
#ifdef USE_LIBSCHILY
@@ -661,7 +660,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));
+ do{int ret;ret=write(bootimage, &bi_table, sizeof (bi_table));}while(0); /* FIXME: check return value */
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 2006-12-30 16:46:49.000000000 +0100
+++ cdrkit-1.1.6/genisoimage/boot-hppa.c 2008-02-27 10:09:20.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 2007-03-14 22:14:33.000000000 +0100
+++ cdrkit-1.1.6/genisoimage/joliet.c 2008-02-27 10:09:20.000000000 +0100
@@ -97,6 +97,7 @@
#include <intcvt.h>
#include <unls.h> /* For UNICODE translation */
#include <schily.h>
+#include <string.h>
#ifdef USE_ICONV
#include <iconv.h>
@@ -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/genisoimage/md5.c.werror cdrkit-1.1.6/genisoimage/md5.c
--- cdrkit-1.1.6/genisoimage/md5.c.werror 2006-10-12 21:38:29.000000000 +0200
+++ cdrkit-1.1.6/genisoimage/md5.c 2008-02-27 10:09:20.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)
- {
- fprintf(stderr, "cannot read from '%s'\n", filename);
- exit(1);
- }
- /* Update the checksum */
- mk_MD5Update(&file_context, buffer, use);
- remain -= use;
+ 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, (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 2006-12-08 14:38:43.000000000 +0100
+++ cdrkit-1.1.6/genisoimage/diag/isovfy.c 2008-02-27 10:09:20.000000000 +0100
@@ -591,11 +591,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);
+ do{int ret;ret=read(fileno(infile), typel, path_table_size);}while(0); /* FIXME: check return value */
#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);
+ do{int ret;ret=read(fileno(infile), typem, path_table_size);}while(0); /* FIXME: check return value */
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 2006-12-08 14:38:43.000000000 +0100
+++ cdrkit-1.1.6/genisoimage/diag/isodump.c 2008-02-27 10:09:20.000000000 +0100
@@ -655,7 +655,7 @@ main(int argc, char *argv[])
if (file_addr < 0)
file_addr = (off_t)0;
showblock(1);
- read(STDIN_FILENO, &c, 1);
+ do{int ret;ret=read(STDIN_FILENO, &c, 1);}while(0); /* FIXME: check return value */
if (c == 'a')
file_addr -= blocksize;
if (c == 'b')
@@ -665,11 +665,11 @@ main(int argc, char *argv[])
printf("Enter new starting block (in hex):");
if (sizeof (file_addr) > sizeof (long)) {
Llong ll;
- scanf("%llx", &ll);
+ do{int ret;ret=scanf("%llx", &ll);}while(0); /* FIXME: check return value */
file_addr = (off_t)ll;
} else {
long l;
- scanf("%lx", &l);
+ do{int ret;ret=scanf("%lx", &l);}while(0); /* FIXME: check return value */
file_addr = (off_t)l;
}
file_addr = file_addr * blocksize;
@@ -679,7 +679,7 @@ main(int argc, char *argv[])
if (c == 'f') {
crsr2(20, 1);
printf("Enter new search string:");
- fgets((char *)search, sizeof (search), stdin);
+ do{char *ret;ret=fgets((char *)search, sizeof (search), stdin);}while(0); /* FIXME: check return value */
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 2006-12-08 14:38:43.000000000 +0100
+++ cdrkit-1.1.6/genisoimage/diag/isoinfo.c 2008-02-27 10:09:20.000000000 +0100
@@ -651,7 +651,7 @@ extract_file(struct iso_directory_record
#endif
len -= tlen;
extent++;
- write(STDOUT_FILENO, buff, tlen);
+ do{int ret;ret=write(STDOUT_FILENO, buff, tlen);}while(0); /* FIXME: check return value */
}
}
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 2006-12-08 14:38:43.000000000 +0100
+++ cdrkit-1.1.6/genisoimage/diag/dump.c 2008-02-27 10:09:20.000000000 +0100
@@ -368,7 +368,7 @@ main(int argc, char *argv[])
do {
if (file_addr < (off_t)0) file_addr = (off_t)0;
showblock(1);
- read(STDIN_FILENO, &c, 1);
+ do{int ret;ret=read(STDIN_FILENO, &c, 1);}while(0); /* FIXME: check return value */
if (c == 'a')
file_addr -= PAGE;
if (c == 'b')
@@ -378,11 +378,11 @@ main(int argc, char *argv[])
printf("Enter new starting block (in hex):");
if (sizeof (file_addr) > sizeof (long)) {
Llong ll;
- scanf("%llx", &ll);
+ do{int ret;ret=scanf("%llx", &ll);}while(0); /* FIXME: check return value */
file_addr = (off_t)ll;
} else {
long l;
- scanf("%lx", &l);
+ do{int ret;ret=scanf("%lx", &l);}while(0); /* FIXME: check return value */
file_addr = (off_t)l;
}
file_addr = file_addr << 11;
@@ -392,7 +392,7 @@ main(int argc, char *argv[])
if (c == 'f') {
crsr2(20, 1);
printf("Enter new search string:");
- fgets((char *)search, sizeof (search), stdin);
+ do{char *ret;ret=fgets((char *)search, sizeof (search), stdin);}while(0); /* FIXME: check return value */
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 2007-03-14 22:14:33.000000000 +0100
+++ cdrkit-1.1.6/genisoimage/write.c 2008-02-27 10:09:20.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/librols/fexec.c.werror cdrkit-1.1.6/librols/fexec.c
--- cdrkit-1.1.6/librols/fexec.c.werror 2006-09-05 10:39:04.000000000 +0200
+++ cdrkit-1.1.6/librols/fexec.c 2008-02-27 10:09:20.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 2006-12-08 11:15:57.000000000 +0100
+++ cdrkit-1.1.6/librols/default.c 2008-02-27 10:09:20.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 2006-09-05 10:39:04.000000000 +0200
+++ cdrkit-1.1.6/librols/raisecond.c 2008-02-27 10:09:20.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) do { int ret; ret = write(STDERR_FILENO, (a), sizeof (a)-1); } while (0)
+#define eprintl(a) do { int ret; ret = write(STDERR_FILENO, (a), strlen(a)); } while (0)
#define is_even(p) ((((long)(p)) & 1) == 0)
#define even(p) (((long)(p)) & ~1L)
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 2006-10-12 21:38:29.000000000 +0200
+++ cdrkit-1.1.6/include/libport.h 2008-02-27 10:09:20.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 -up cdrkit-1.1.6/Changelog.werror cdrkit-1.1.6/Changelog