1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
Subject: Cast "unsigned char *" to "char *"
Author: Roger Leigh <rleigh@debian.org>
Date: 2005-07-20
--- a/fontdesc.c
+++ b/fontdesc.c
@@ -800,7 +800,7 @@
n = inttob(k, len); \
off -= n+1; \
ds_buf[off] = XXX1+len/256; \
- strncpy(ds_buf+off+1, k, n); \
+ strncpy(ds_buf+off+1, (char *) k, n); \
ds_p = ds_buf+off; \
ds_len = 1+n+len;
--- a/decompfont.c
+++ b/decompfont.c
@@ -93,8 +93,8 @@
ntail = fe->n+strlen(ffdcmp->dcmp_name);
fontidx = NULL;
for (i = 1; i <= NJSUBS; i++) {
- (void)sprintf(n, "%s%s%s", ffdcmp->dcmp_name, jsubfontname(i), ntail);
- readfontdef(i, 0, fe->s, fe->d, 0, strlen(n), (char *)n, &fontidx);
+ (void)sprintf((char *)n, "%s%s%s", ffdcmp->dcmp_name, jsubfontname(i), ntail);
+ readfontdef(i, 0, fe->s, fe->d, 0, strlen((char *)n), (char *)n, &fontidx);
ffdcmp->dcmp_fetab[i] = fontidx->fent;
}
fe->fnt_markchar = dcmpntt_markchar;
@@ -191,9 +191,9 @@
ntail = fe->n+strlen(ffdcmp->dcmp_name);
fontidx = NULL;
for (i = 1; i <= NCSUBS; i++) {
- (void)sprintf(n, "%s%c%02x%c%s",
+ (void)sprintf((char *)n, "%s%c%02x%c%s",
ffdcmp->dcmp_name, CSUB_SEP, 31+i*2, CSUB_SEP, ntail);
- readfontdef(i, 0, fe->s, fe->d, 0, strlen(n), (char *)n, &fontidx);
+ readfontdef(i, 0, fe->s, fe->d, 0, strlen((char *)n), (char *)n, &fontidx);
ffdcmp->dcmp_fetab[i] = fontidx->fent;
}
fe->fnt_markchar = dcmpdcd_markchar;
|