From: ceriel Date: Fri, 7 Oct 1988 10:26:37 +0000 (+0000) Subject: delinted X-Git-Tag: release-5-5~2803 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=79295ca3eaf5f3ff2ae46b6dc4669d796ccd0231;p=ack.git delinted --- diff --git a/util/cmisc/cclash.c b/util/cmisc/cclash.c index 01703b670..2651e3065 100644 --- a/util/cmisc/cclash.c +++ b/util/cmisc/cclash.c @@ -189,7 +189,7 @@ Salloc(str) if (str == 0) str = ""; - return strcpy(Malloc(strlen(str) + 1), str); + return strcpy(Malloc((unsigned)strlen(str) + 1), str); } EnHash(id) diff --git a/util/cmisc/cid.c b/util/cmisc/cid.c index d897ef30c..c84943817 100644 --- a/util/cmisc/cid.c +++ b/util/cmisc/cid.c @@ -55,6 +55,7 @@ DoOption(str) } } +/*ARGSUSED*/ CheckId(id, len) char *id; { @@ -100,7 +101,7 @@ GetMacros(fn) if ((fp = fopen(fn, "r")) == NULL) { fprintf(stderr, "%s: cannot read file \"%s\"\n", ProgName, fn); - return 0; + return; } while ((c = getc(fp)) != EOF) { @@ -163,7 +164,7 @@ Salloc(str) if (str == 0) { str = ""; } - return strcpy(Malloc(strlen(str) + 1), str); + return strcpy(Malloc((unsigned)strlen(str) + 1), str); } struct idf * diff --git a/util/cmisc/mkdep.c b/util/cmisc/mkdep.c index 3e1ca0313..382676949 100644 --- a/util/cmisc/mkdep.c +++ b/util/cmisc/mkdep.c @@ -76,7 +76,7 @@ add_name(nm) nlp = nlp->next; } - (nnlp = new_namelist())->name = strcpy(Malloc(strlen(nm) + 1), nm); + (nnlp = new_namelist())->name = strcpy(Malloc((unsigned)strlen(nm) + 1), nm); if (lnlp) { nnlp->next = lnlp->next; @@ -100,6 +100,7 @@ print_namelist(nm, nlp) } } +/*ARGSUSED*/ main(argc, argv) char *argv[]; { @@ -135,10 +136,12 @@ contains_slash(s) return 0; } +extern char *fgets(); + dofile(fn) char *fn; { - char *fgets(), buf[BSIZ]; + char buf[BSIZ]; FILE *fp; char *nm, *include_line(); @@ -156,7 +159,7 @@ dofile(fn) while (fgets(buf, BSIZ, fp) != NULL) if (nm = include_line(buf)) { add_name(nm); - dofile(nm); + if (dofile(nm)) ; } fclose(fp); diff --git a/util/cmisc/prid.c b/util/cmisc/prid.c index 931898248..dfd748805 100644 --- a/util/cmisc/prid.c +++ b/util/cmisc/prid.c @@ -106,7 +106,7 @@ Salloc(str) if (str == 0) str = ""; - return strcpy(Malloc(strlen(str) + 1), str); + return strcpy(Malloc((unsigned)strlen(str) + 1), str); } EnHash(id)