diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-01-28 08:44:39 +0000 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-01-28 08:44:39 +0000 |
commit | f944578414d5adc0c6c3fb22ad5808077444a410 (patch) | |
tree | a829b16e9e80c567c60d159efcd58e3d88d624db | |
parent | f31f1c3268e071514ec4d4c907a62ba5f62d8a00 (diff) | |
download | icon-f944578414d5adc0c6c3fb22ad5808077444a410.tar.gz |
Fixed many warnings, but still some test failed with segfault
-rw-r--r-- | debian/patches/fix-warnings.patch | 740 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 741 insertions, 0 deletions
diff --git a/debian/patches/fix-warnings.patch b/debian/patches/fix-warnings.patch new file mode 100644 index 0000000..5e979fe --- /dev/null +++ b/debian/patches/fix-warnings.patch @@ -0,0 +1,740 @@ +Index: icon/src/common/infer.c +=================================================================== +--- icon.orig/src/common/infer.c 2002-04-11 23:41:08.000000000 +0000 ++++ icon/src/common/infer.c 2013-01-28 06:28:57.698559662 +0000 +@@ -23,8 +23,8 @@ + assert (sizeof(int) >= 4); /* need 32-bit ints or better */ + assert (sizeof(long) <= 8); /* but can't handle over 64 */ + printf("/* generated by infer.c */\n"); +- printf("#define IntBits %d\n", 8 * sizeof(int)); +- printf("#define WordBits %d\n", 8 * sizeof(void *)); ++ printf("#define IntBits %d\n", 8 * (int)sizeof(int)); ++ printf("#define WordBits %d\n", 8 * (int)sizeof(void *)); + if (offsetof(tstruct, d) > sizeof(void *)) + printf("#define Double\n"); + if (atdepth(2) > atdepth(1)) +Index: icon/src/xpm/data.c +=================================================================== +--- icon.orig/src/xpm/data.c 2005-10-05 15:29:21.000000000 +0000 ++++ icon/src/xpm/data.c 2013-01-28 07:15:18.841563094 +0000 +@@ -8,11 +8,6 @@ + * Developed by Arnaud Le Hors * + \*****************************************************************************/ + +-/* Official version number */ +-static char *RCS_Version = "$XpmVersion: 3.2c $"; +- +-/* Internal version number */ +-static char *RCS_Id = "$Id: xpm.shar,v 3.13 1992/12/29 16:05:26 lehors Exp $"; + + #include "xpmP.h" + #ifdef VMS +@@ -23,7 +18,6 @@ + #include <ctype.h> + #endif + +-FUNC(atoui, unsigned int, (char *p, unsigned int l, unsigned int *ui_return)); + LFUNC(ParseComment, int, (xpmData *mdata)); + + unsigned int +@@ -105,12 +99,13 @@ + ungetc(*s, file); + } + } ++ return 0; + } + + /* + * skip to the end of the current string and the beginning of the next one + */ +-xpmNextString(mdata) ++int xpmNextString(mdata) + xpmData *mdata; + { + if (!mdata->type) +@@ -136,6 +131,7 @@ + ungetc(c, file); + } + } ++ return 0; + } + + +@@ -208,7 +204,7 @@ + while (isspace(c = *mdata->cptr) && c != mdata->Eos) + mdata->cptr++; + start = mdata->cptr; +- while (c = *mdata->cptr) ++ while ((c = *mdata->cptr)) + mdata->cptr++; + n = mdata->cptr - start + 1; + p = (char *) malloc(n); +@@ -277,7 +273,7 @@ + /* + * get the current comment line + */ +-xpmGetCmt(mdata, cmt) ++int xpmGetCmt(mdata, cmt) + xpmData *mdata; + char **cmt; + { +@@ -291,6 +287,7 @@ + mdata->CommentLength = 0; + } else + *cmt = NULL; ++ return 0; + } + + /* +@@ -403,7 +400,7 @@ + /* + * close the file related to the xpmData if any + */ +-XpmDataClose(mdata) ++int XpmDataClose(mdata) + xpmData *mdata; + { + switch (mdata->type) { +@@ -419,4 +416,5 @@ + break; + #endif + } ++ return 0; + } +Index: icon/src/xpm/create.c +=================================================================== +--- icon.orig/src/xpm/create.c 2005-10-05 15:29:21.000000000 +0000 ++++ icon/src/xpm/create.c 2013-01-28 06:45:50.887531187 +0000 +@@ -260,7 +260,7 @@ + for (l = 0, cs = colorsymbols; l < numsymbols; l++, cs++) + if ((!cs->name && cs->value && cts[cts_index] && + !strcasecmp(cs->value,cts[cts_index])) || +- cs->name && !strcmp(cs->name, s)) ++ (cs->name && !strcmp(cs->name, s))) + break; + if (l != numsymbols) { + if (cs->name && cs->value) +@@ -344,7 +344,7 @@ + + #endif + +-xpmCreateImage(display, attrib, image_return, shapeimage_return, attributes) ++int xpmCreateImage(display, attrib, image_return, shapeimage_return, attributes) + Display *display; + xpmInternAttrib *attrib; + XImage **image_return; +@@ -414,8 +414,8 @@ + ErrorStatus = CreateColors(display, attributes, attrib->colorTable, + attrib->ncolors, image_pixels, mask_pixels, + &mask_pixel, &pixels, &npixels); +- if (ErrorStatus != XpmSuccess && (ErrorStatus < 0 || attributes && +- (attributes->valuemask & XpmExactColors) && attributes->exactColors)) ++ if ((ErrorStatus != XpmSuccess) && (ErrorStatus < 0 || (attributes && ++ (attributes->valuemask & XpmExactColors) && attributes->exactColors))) + RETURN(ErrorStatus); + + /* +Index: icon/src/xpm/misc.c +=================================================================== +--- icon.orig/src/xpm/misc.c 2000-07-30 02:42:32.000000000 +0000 ++++ icon/src/xpm/misc.c 2013-01-28 06:47:53.666632432 +0000 +@@ -14,7 +14,7 @@ + * Free the computed color table + */ + +-xpmFreeColorTable(colorTable, ncolors) ++int xpmFreeColorTable(colorTable, ncolors) + char ***colorTable; + int ncolors; + { +@@ -31,6 +31,7 @@ + } + free(colorTable); + } ++ return 0; + } + + +@@ -39,7 +40,7 @@ + * which ones must be freed later on. + */ + +-xpmInitInternAttrib(attrib) ++int xpmInitInternAttrib(attrib) + xpmInternAttrib *attrib; + { + attrib->ncolors = 0; +@@ -48,6 +49,7 @@ + attrib->xcolors = NULL; + attrib->colorStrings = NULL; + attrib->mask_pixel = UNDEF_PIXEL; ++ return 0; + } + + +@@ -55,7 +57,7 @@ + * Free the xpmInternAttrib pointers which have been allocated + */ + +-xpmFreeInternAttrib(attrib) ++int xpmFreeInternAttrib(attrib) + xpmInternAttrib *attrib; + { + unsigned int a, ncolors; +@@ -74,13 +76,14 @@ + free(*sptr); + free(attrib->colorStrings); + } ++ return 0; + } + + + /* + * Free array of extensions + */ +-XpmFreeExtensions(extensions, nextensions) ++int XpmFreeExtensions(extensions, nextensions) + XpmExtension *extensions; + int nextensions; + { +@@ -101,6 +104,7 @@ + } + free(extensions); + } ++ return 0; + } + + +@@ -108,7 +112,7 @@ + * Return the XpmAttributes structure size + */ + +-XpmAttributesSize() ++int XpmAttributesSize() + { + return sizeof(XpmAttributes); + } +@@ -119,7 +123,7 @@ + * but the structure itself + */ + +-XpmFreeAttributes(attributes) ++int XpmFreeAttributes(attributes) + XpmAttributes *attributes; + { + if (attributes) { +@@ -159,6 +163,7 @@ + } + attributes->valuemask = 0; + } ++ return 0; + } + + +@@ -167,7 +172,7 @@ + * the xpmInternAttrib structure. + */ + +-xpmSetAttributes(attrib, attributes) ++int xpmSetAttributes(attrib, attributes) + xpmInternAttrib *attrib; + XpmAttributes *attributes; + { +@@ -184,6 +189,7 @@ + attributes->height = attrib->height; + attributes->valuemask |= XpmSize; + } ++ return 0; + } + + #ifdef NEED_STRDUP +Index: icon/src/xpm/parse.c +=================================================================== +--- icon.orig/src/xpm/parse.c 2000-07-30 02:42:32.000000000 +0000 ++++ icon/src/xpm/parse.c 2013-01-28 07:11:16.472740553 +0000 +@@ -136,7 +136,7 @@ + /* + * parse extensions + */ +- if (attributes && (attributes->valuemask & XpmReturnExtensions)) ++ if (attributes && (attributes->valuemask & XpmReturnExtensions)) { + if (extensions) { + ErrorStatus = ParseExtensions(data, &attributes->extensions, + &attributes->nextensions); +@@ -146,6 +146,7 @@ + attributes->extensions = NULL; + attributes->nextensions = 0; + } ++ } + + /* + * store found informations in the xpmInternAttrib structure +@@ -265,7 +266,7 @@ + */ + curkey = 0; + lastwaskey = 0; +- while (l = xpmNextWord(data, buf)) { ++ while ((l = xpmNextWord(data, buf))) { + if (!lastwaskey) { + for (key = 0, sptr = xpmColorKeys; key < NKEYS; key++, sptr++) + if ((strlen(*sptr) == l) && (!strncmp(*sptr, buf, l))) +@@ -338,7 +339,7 @@ + + bzero(colidx, 256 * sizeof(short)); + for (a = 0; a < ncolors; a++) +- colidx[ colorTable[a][0][0] ] = a + 1; ++ colidx[(size_t) colorTable[a][0][0] ] = a + 1; + + for (y = 0; y < height; y++) + { +@@ -363,7 +364,7 @@ + + bzero(cidx, 256*256 * sizeof(short)); + for (a = 0; a < ncolors; a++) +- cidx [ colorTable[a][0][0] ][ colorTable[a][0][1] ] = a + 1; ++ cidx [(size_t) colorTable[a][0][0] ][(size_t) colorTable[a][0][1] ] = a + 1; + + for (y = 0; y < height; y++) + { +Index: icon/src/xpm/xpmP.h +=================================================================== +--- icon.orig/src/xpm/xpmP.h 2000-07-30 02:42:32.000000000 +0000 ++++ icon/src/xpm/xpmP.h 2013-01-28 07:15:17.804114555 +0000 +@@ -173,6 +173,7 @@ + + /* I/O utility */ + ++FUNC(xpmGetString, int, (xpmData * mdata, char **sptr, unsigned int *l)); + FUNC(xpmNextString, int, (xpmData * mdata)); + FUNC(xpmNextUI, int, (xpmData * mdata, unsigned int *ui_return)); + +@@ -276,4 +277,6 @@ + FUNC(strdup, char *, (char *s1)); + #endif + ++FUNC(atoui, unsigned int, (char *p, unsigned int l, unsigned int *ui_return)); ++ + #endif +Index: icon/src/xpm/XpmWrFFrI.c +=================================================================== +--- icon.orig/src/xpm/XpmWrFFrI.c 2000-07-30 02:42:32.000000000 +0000 ++++ icon/src/xpm/XpmWrFFrI.c 2013-01-28 07:42:05.840038776 +0000 +@@ -63,7 +63,7 @@ + else + name++; + #endif +- if (dot = index(name, '.')) { ++ if ((dot = index(name, '.'))) { + new_name = (char*)strdup(name); + if (!new_name) { + new_name = NULL; +@@ -71,7 +71,7 @@ + } else { + /* change '.' to '_' to get a valid C syntax name */ + name = s = new_name; +- while (dot = index(s, '.')) { ++ while ((dot = index(s, '.'))) { + *dot = '_'; + s = dot; + } +@@ -206,7 +206,7 @@ + + if (colorTable && mask_pixel != UNDEF_PIXEL) { + for (key = 1; key <= NKEYS; key++) { +- if (s = colorTable[mask_pixel][key]) ++ if ((s = colorTable[mask_pixel][key])) + fprintf(file, "\t%s %s", xpmColorKeys[key - 1], s); + } + } else +@@ -258,7 +258,7 @@ + if (b != ncolors2) { + c = 0; + for (key = 1; key <= NKEYS; key++) { +- if (s = colorTable[b][key]) ++ if ((s = colorTable[b][key])) + fprintf(file, "\t%s %s", xpmColorKeys[key - 1], s); + } + } +Index: icon/src/rtt/rttdb.c +=================================================================== +--- icon.orig/src/rtt/rttdb.c 2002-04-11 20:50:17.000000000 +0000 ++++ icon/src/rtt/rttdb.c 2013-01-28 07:29:50.509893975 +0000 +@@ -542,7 +542,7 @@ + fprintf(db, "%d ", num_cases); + indx = 1; + for (i = 0; i < num_cases; ++i) { +- fprintf(db, "\n%d ", il->u[indx++].n); /* selection number */ ++ fprintf(db, "\n%d ", (int)il->u[indx++].n); /* selection number */ + put_inlin(db, il->u[indx++].fld); /* action */ + } + fprintf(db, "\n"); +@@ -567,14 +567,14 @@ + * runerr with no value argument. + */ + fprintf(db, "runerr1 "); +- fprintf(db, "%d ", il->u[0].n); /* error number */ ++ fprintf(db, "%d ", (int)il->u[0].n); /* error number */ + break; + case IL_Err2: + /* + * runerr with a value argument. + */ + fprintf(db, "runerr2 "); +- fprintf(db, "%d ", il->u[0].n); /* error number */ ++ fprintf(db, "%d ", (int)il->u[0].n); /* error number */ + put_inlin(db, il->u[1].fld); /* variable */ + break; + case IL_Lst: +@@ -649,15 +649,15 @@ + /* + * A variable. + */ +- fprintf(db, "%d ", il->u[0].n); /* symbol table index */ ++ fprintf(db, "%d ", (int)il->u[0].n); /* symbol table index */ + break; + case IL_Subscr: + /* + * A subscripted variable. + */ + fprintf(db, "[ "); +- fprintf(db, "%d ", il->u[0].n); /* symbol table index */ +- fprintf(db, "%d ", il->u[1].n); /* subscripting index */ ++ fprintf(db, "%d ", (int)il->u[0].n); /* symbol table index */ ++ fprintf(db, "%d ", (int)il->u[1].n); /* subscripting index */ + break; + case IL_Block: + /* +@@ -671,7 +671,7 @@ + /* + * Output a symbol table of tended variables. + */ +- fprintf(db, "%d ", il->u[1].n); /* number of local tended */ ++ fprintf(db, "%d ", (int)il->u[1].n); /* number of local tended */ + for (i = 2; i - 2 < il->u[1].n; ++i) + switch (il->u[i].n) { + case TndDesc: +@@ -733,8 +733,8 @@ + else + fprintf(db, "f "); + +- fprintf(db, "%d ", il->u[5].n); /* num string bufs */ +- fprintf(db, "%d ", il->u[6].n); /* num cset bufs */ ++ fprintf(db, "%d ", (int)il->u[5].n); /* num string bufs */ ++ fprintf(db, "%d ", (int)il->u[6].n); /* num cset bufs */ + i = il->u[7].n; + fprintf(db, "%d ", i); /* num args */ + indx = 8; +@@ -961,15 +961,15 @@ + fprintf(db, "$efail "); /* errorfail statement */ + break; + case ILC_Goto: +- fprintf(db, "$goto %d ", ilc->n); /* goto label */ ++ fprintf(db, "$goto %d ", (int)ilc->n); /* goto label */ + break; + case ILC_CGto: + fprintf(db, "$cgoto "); /* conditional goto */ + put_ilc(db, ilc->code[0]); /* condition (with $c $e) */ +- fprintf(db, "%d ", ilc->n); /* label */ ++ fprintf(db, "%d ", (int)ilc->n); /* label */ + break; + case ILC_Lbl: +- fprintf(db, "$lbl %d ", ilc->n); /* label */ ++ fprintf(db, "$lbl %d ", (int)ilc->n); /* label */ + break; + case ILC_LBrc: + fprintf(db, "${ "); /* start of C block with dcls */ +@@ -1000,7 +1000,7 @@ + if (ilc->n == RsltIndx) + fprintf(db, "r "); /* this is "result" */ + else +- fprintf(db, "%d ", ilc->n); /* offset into a symbol table */ ++ fprintf(db, "%d ", (int)ilc->n); /* offset into a symbol table */ + } + + /* +@@ -1028,11 +1028,12 @@ + fprintf(db, "e"); /* can do error conversion */ + else + fprintf(db, "_"); /* cannot do error conversion */ +- if (may_fthru) /* body functions only: */ ++ if (may_fthru) { /* body functions only: */ + if (flag & DoesFThru) + fprintf(db, "t"); /* can fall through */ + else + fprintf(db, "_"); /* cannot fall through */ ++ } + fprintf(db, " "); + } + +Index: icon/src/preproc/bldtok.c +=================================================================== +--- icon.orig/src/preproc/bldtok.c 2001-12-12 18:28:12.000000000 +0000 ++++ icon/src/preproc/bldtok.c 2013-01-28 07:35:48.898131331 +0000 +@@ -212,7 +212,7 @@ + /* + * Look ahead to see if a ## operator is next. + */ +- if (*next_char == '#' && next_char[1] == '#') ++ if (*next_char == '#' && next_char[1] == '#') { + if (tok_id == PpDirEnd) + errt1(t, "## expressions must not cross directive boundaries"); + else { +@@ -222,6 +222,7 @@ + free_t(t); + return NULL; + } ++ } + return t; + } + +@@ -365,7 +366,7 @@ + * for white space to discard. + */ + cs->dir_state = Within; +- if ((t1 = chck_wh_sp(cs)) != NULL) ++ if ((t1 = chck_wh_sp(cs)) != NULL) { + if (t1->tok_id == PpDirEnd) { + /* + * We found a new-line, this is a null preprocessor directive. +@@ -376,6 +377,7 @@ + } + else + free_t(t1); /* discard white space */ ++ } + c = *next_char; + if (islower(c) || isupper(c) || c == '_') { + /* +@@ -399,11 +401,12 @@ + * A header name has to be tokenized specially. Find + * it, then save the token. + */ +- if ((t2 = chck_wh_sp(cs)) != NULL) ++ if ((t2 = chck_wh_sp(cs)) != NULL) { + if (t2->tok_id == PpDirEnd) + errt1(t2, "file name missing from #include"); + else + free_t(t2); ++ } + c = *next_char; + if (c == '"') + cs->tok_sav = hdr_tok('"', StrLit, cs); +@@ -752,12 +755,13 @@ + /* + * The operand must be in the same preprocessing directive. + */ +- if ((t2 = chck_wh_sp(cs)) != NULL) ++ if ((t2 = chck_wh_sp(cs)) != NULL) { + if (t2->tok_id == PpDirEnd) + errt2(t2, t1->image, + " preprocessing expression must not cross directive boundary"); + else + free_t(t2); ++ } + return t1; + + default: +Index: icon/src/preproc/macro.c +=================================================================== +--- icon.orig/src/preproc/macro.c 2001-12-12 18:28:13.000000000 +0000 ++++ icon/src/preproc/macro.c 2013-01-28 07:36:19.080691786 +0000 +@@ -270,7 +270,7 @@ + static char buf[20]; + + m = *m_find(id->image); +- if (m != NULL && m->category == SpecMac) ++ if (m != NULL && m->category == SpecMac) { + if (m->mname == line_mac) { /* __LINE___ */ + sprintf(buf, "%d", id->line); + m->body = new_t_lst(new_token(PpNumber, buf, id->fname, +@@ -279,6 +279,7 @@ + else if (m->mname == file_mac) /* __FILE__ */ + m->body = new_t_lst(new_token(StrLit, id->fname, id->fname, + id->line)); ++ } + return m; + } + +Index: icon/src/runtime/interp.r +=================================================================== +--- icon.orig/src/runtime/interp.r 2002-07-10 23:42:38.000000000 +0000 ++++ icon/src/runtime/interp.r 2013-01-28 08:04:40.576851911 +0000 +@@ -1601,7 +1601,7 @@ + char buf[50]; + + sprintf(buf, "unimplemented opcode: %ld (0x%08x)\n", +- (long)lastop, lastop); ++ (long)lastop, (unsigned int)lastop); + syserr(buf); + } + } +Index: icon/src/runtime/rmisc.r +=================================================================== +--- icon.orig/src/runtime/rmisc.r 2004-11-18 17:13:16.000000000 +0000 ++++ icon/src/runtime/rmisc.r 2013-01-28 08:11:35.845335783 +0000 +@@ -683,7 +683,7 @@ + putc(')', f); + } + else if (Type(*dp) == T_External) +- fprintf(f, "external(%d)",((struct b_external *)BlkLoc(*dp))->blksize); ++ fprintf(f, "external(%d)",(int)((struct b_external *)BlkLoc(*dp))->blksize); + else if (Type(*dp) <= MaxType) + fprintf(f, "%s", blkname[Type(*dp)]); + else +Index: icon/src/runtime/rxrsc.ri +=================================================================== +--- icon.orig/src/runtime/rxrsc.ri 2003-04-24 20:41:19.000000000 +0000 ++++ icon/src/runtime/rxrsc.ri 2013-01-28 08:14:34.695479550 +0000 +@@ -685,7 +685,7 @@ + */ + p = xlfd_field(fontlist[champ], XLFD_Size); + if (p[0] == '0' && p[1] == '-') +- sprintf(fontspec, "%.*s%d%s", p - fontlist[champ], ++ sprintf(fontspec, "%.*s%d%s", (int)(p - fontlist[champ]), + fontlist[champ], bestsize, p + 1); + else + strcpy(fontspec, fontlist[champ]); +Index: icon/ipl/cfuncs/icall.h +=================================================================== +--- icon.orig/ipl/cfuncs/icall.h 2004-11-17 22:50:50.000000000 +0000 ++++ icon/ipl/cfuncs/icall.h 2013-01-28 08:39:11.130875411 +0000 +@@ -94,6 +94,7 @@ + + #include <stdio.h> + #include <limits.h> ++#include <string.h> + + #if INT_MAX == 32767 + #define WordSize 16 +Index: icon/src/iconc/ccode.c +=================================================================== +--- icon.orig/src/iconc/ccode.c 2002-07-10 16:49:38.000000000 +0000 ++++ icon/src/iconc/ccode.c 2013-01-28 08:35:30.801468796 +0000 +@@ -3719,7 +3719,7 @@ + int n; + { + struct code *cd; +- static cnt=1; ++ static int cnt=1; + + cd = NewCode(2 * n + 1); + cd->cd_id = C_CdAry; +Index: icon/src/iconc/chkinv.c +=================================================================== +--- icon.orig/src/iconc/chkinv.c 2000-07-30 02:42:31.000000000 +0000 ++++ icon/src/iconc/chkinv.c 2013-01-28 08:36:46.476591093 +0000 +@@ -22,7 +22,7 @@ + static int seq_exec (int exec_flg1, int exec_flg2); + static int spcl_inv (struct node *n, struct node *asgn); + +-static ret_flag; ++static int ret_flag; + + /* + * chkinv - check for invocation and assignment optimizations. +Index: icon/src/iconc/codegen.c +=================================================================== +--- icon.orig/src/iconc/codegen.c 2000-07-30 02:42:32.000000000 +0000 ++++ icon/src/iconc/codegen.c 2013-01-28 08:36:25.540948861 +0000 +@@ -156,7 +156,7 @@ + for (i = 0; i < GHSize; i++) + for (gptr = ghash[i]; gptr != NULL; gptr = gptr->blink) + if (!(gptr->flag & F_SmplInv)) +- fprintf(codefile, " {%d, \"%s\"},\n", strlen(gptr->name), ++ fprintf(codefile, " {%d, \"%s\"},\n", (int)strlen(gptr->name), + gptr->name); + fprintf(codefile, " };\n"); + } +@@ -352,7 +352,7 @@ + fprintf(inclfile, "dptr r_rslt, continuation r_s_cont);\n"); + initpblk(inclfile, 'P', p->prefix, name, nquals, p->nargs, p->ndynam, + p->nstatic, n_stat + 1); +- fprintf(inclfile, "\n {%d, \"%s\"},\n", strlen(name), name); ++ fprintf(inclfile, "\n {%d, \"%s\"},\n", (int)strlen(name), name); + } + arg_nms(p->args, init_glbl); + p->tnd_loc = dyn_nms(p->dynams, init_glbl); +@@ -376,7 +376,7 @@ + n = arg_nms(lptr->next, prt); + lptr->val.index = n; + if (prt) +- fprintf(inclfile, " {%d, \"%s\"},\n", strlen(lptr->name), lptr->name); ++ fprintf(inclfile, " {%d, \"%s\"},\n", (int)strlen(lptr->name), lptr->name); + return n + 1; + } + +@@ -395,7 +395,7 @@ + n = dyn_nms(lptr->next, prt); + lptr->val.index = n; + if (prt) +- fprintf(inclfile, " {%d, \"%s\"},\n", strlen(lptr->name), lptr->name); ++ fprintf(inclfile, " {%d, \"%s\"},\n", (int)strlen(lptr->name), lptr->name); + return n + 1; + } + +@@ -412,7 +412,7 @@ + stat_nms(lptr->next, prt); + lptr->val.index = ++n_stat; + if (prt) +- fprintf(inclfile, " {%d, \"%s\"},\n", strlen(lptr->name), lptr->name); ++ fprintf(inclfile, " {%d, \"%s\"},\n", (int)strlen(lptr->name), lptr->name); + } + + /* +@@ -477,7 +477,7 @@ + fprintf(inclfile, "\n"); + implproto(ip); + initpblk(inclfile, 'F', prefix, name, 1, nargs, -1, 0, 0); +- fprintf(inclfile, "{%d, \"%s\"}}};\n", strlen(name), name); ++ fprintf(inclfile, "{%d, \"%s\"}}};\n", (int)strlen(name), name); + } + + /* +@@ -520,7 +520,7 @@ + */ + initpblk(inclfile, 'R', r->prefix, name, nfields + 1, nfields, -2, + r->rec_num, 1); +- fprintf(inclfile, "\n {%d, \"%s\"},\n", strlen(name), name); ++ fprintf(inclfile, "\n {%d, \"%s\"},\n", (int)strlen(name), name); + fldnames(r->fields); + fprintf(inclfile, " }};\n"); + } +@@ -538,7 +538,7 @@ + return; + fldnames(fields->next); + name = fields->name; +- fprintf(inclfile, " {%d, \"%s\"},\n", strlen(name), name); ++ fprintf(inclfile, " {%d, \"%s\"},\n", (int)strlen(name), name); + } + + /* +@@ -1048,7 +1048,7 @@ + fprintf(codefile, ".vword.sptr = \"%s\";\n", lit->image); + fprintf(codefile, " "); + val_loc(cd->Rslt, outer); +- fprintf(codefile, ".dword = %d;\n", strlen(lit->image)); ++ fprintf(codefile, ".dword = %d;\n", (int)strlen(lit->image)); + fprintf(codefile, " cnv_int(&"); + val_loc(cd->Rslt, outer); + fprintf(codefile, ", &"); +@@ -1193,7 +1193,7 @@ + */ + if (cd->FileName != NULL) { + fprintf(codefile, " file_name = \""); +- prt_i_str(codefile, cd->FileName, strlen(cd->FileName)); ++ prt_i_str(codefile, cd->FileName, (int)strlen(cd->FileName)); + fprintf(codefile, "\";\n"); + } + if (cd->LineNum != 0) +Index: icon/src/iconc/csym.c +=================================================================== +--- icon.orig/src/iconc/csym.c 2000-07-30 02:42:32.000000000 +0000 ++++ icon/src/iconc/csym.c 2013-01-28 08:34:56.175244144 +0000 +@@ -821,7 +821,7 @@ + * invocation. + */ + fprintf(codefile, " {T_Proc, 11, O%c%c_%s, %d, -1, 0, 0, {{%d, \"", c1, c2, +- name, nargs, strlen(op)); ++ name, nargs, (int)strlen(op)); + for (s = op; *s != '\0'; ++s) { + if (*s == '\\') + fprintf(codefile, "\\"); diff --git a/debian/patches/series b/debian/patches/series index 1a2ecc9..150d59a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ config-illumos.patch undefine-SHARED-if-defined.patch use-__fpending.patch dyson-mklib.sh-gcc.patch +fix-warnings.patch |