From: Bernd Eckenfels Date: Sat, 4 Feb 2006 22:58:43 +0000 (+0100) Subject: Imported Debian patch 1.01b-14 X-Git-Tag: debian/1.01b-14 X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=0f5e39d0015cd91b879b325de8da77247447ca05;p=pkg%2Fmmv.git Imported Debian patch 1.01b-14 --- diff --git a/debian/changelog b/debian/changelog index e3aeb3c..981b68d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +mmv (1.01b-14) unstable; urgency=low + + * Thanks for NMU to Joey, Ai and Uwe + * applied Patch to initialize var (Closes: Bug #316363) + * removed 2 dozent GCC warnings (uninitialized, unused, ambiquous else) + + -- Bernd Eckenfels Sat, 04 Feb 2006 23:58:43 +0100 + mmv (1.01b-12.3) unstable; urgency=low * NMU diff --git a/debian/rules b/debian/rules index 41a93ba..82666b8 100755 --- a/debian/rules +++ b/debian/rules @@ -36,7 +36,8 @@ clean: $(checkdir) -make clean -rm -f debian/files* debian/substvars* debian/*~ core */core *~ - -rm -rf debian/tmp build + rm -rf debian/tmp + -rm build binary: binary-arch binary-indep diff --git a/mmv.c b/mmv.c index f95772e..200392c 100644 --- a/mmv.c +++ b/mmv.c @@ -439,7 +439,9 @@ static SLICER slicer[2] = {{NULL, NULL, 0}, {NULL, NULL, 0}}; static int badreps = 0, paterr = 0, direrr, failed = 0, gotsig = 0, repbad; static FILE *outfile; +#ifdef IS_MSDOS static char IDF[] = "$$mmvdid."; +#endif static char TEMP[] = "$$mmvtmp."; static char TOOLONG[] = "(too long)"; static char EMPTY[] = "(empty)"; @@ -457,12 +459,12 @@ char pathbuf[MAXPATH]; char fullrep[MAXPATH + 1]; static char *(start[MAXWILD]); static int len[MAXWILD]; -static char hasdot[MAXWILD]; static REP mistake; #define MISTAKE (&mistake) #ifdef IS_MSDOS +static char hasdot[MAXWILD]; static int olddevflag, curdisk, maxdisk; static struct { char ph_banner[30]; @@ -627,7 +629,7 @@ static void procargs(argc, argv, pfrompat, ptopat) } endargs: - if (op == DFLT) + if (op == DFLT) { if (strcmp(cmdname, MOVENAME) == 0) op = XMOVE; else if (strcmp(cmdname, COPYNAME) == 0) @@ -638,6 +640,8 @@ endargs: op = HARDLINK; else op = DFLTOP; + } + if ( op & DIRMOVE && #ifdef IS_MSDOS @@ -784,7 +788,7 @@ static void matchpat() static int parsepat() { char *p, *lastname, c; - int totwilds, instage, x, havedot; + int totwilds, instage, x; static char TRAILESC[] = "%s -> %s : trailing %c is superfluous.\n"; lastname = from; @@ -1047,7 +1051,7 @@ static int dostage(lastend, pathend, start1, len1, stage, anylev) DIRINFO *di; HANDLE *h, *hto; int prelen, litlen, nfils, i, k, flags, try; - FILEINFO **pf, *fdel; + FILEINFO **pf, *fdel = NULL; char *nto, *firstesc; REP *p; int wantdirs, ret = 1, laststage = (stage + 1 == nstages); @@ -1177,11 +1181,12 @@ static int trymatch(ffrom, pat) if (*p == '.' || (!matchall && ffrom->fi_attrib & (FA_HIDDEN | FA_SYSTEM))) return(strcmp(pat, p) == 0); #else - if (*p == '.') + if (*p == '.') { if (p[1] == '\0' || (p[1] == '.' && p[2] == '\0')) return(strcmp(pat, p) == 0); else if (!matchall && *pat != '.') return(0); + } #endif return(-1); } @@ -1317,7 +1322,7 @@ static int checkto(hfrom, f, phto, pnto, pfdel) { char tpath[MAXPATH + 1]; char *pathend; - FILEINFO *fdel; + FILEINFO *fdel = NULL; int hlen, tlen; if (op & DIRMOVE) { @@ -1410,7 +1415,9 @@ static char *getpath(tpath) static int badname(s) char *s; { +#ifdef IS_MSDOS char *ext; +#endif return ( #ifdef IS_MSDOS @@ -1720,20 +1727,19 @@ static HANDLE *checkdir(p, pathend, which) struct stat dstat; DIRID d; DEVID v; - DIRINFO **newdirs, *di; - int nfils; - FILEINFO **fils; + DIRINFO *di = NULL; char *myp, *lastslash = NULL; int sticky; HANDLE *h; - if (hsearch(p, which, &h)) + if (hsearch(p, which, &h)) { if (h->h_di == NULL) { direrr = h->h_err; return(NULL); } else return(h); + } if (*p == '\0') myp = "."; @@ -1904,7 +1910,10 @@ static int match(pat, s, start1, len1) char *pat, *s, **start1; int *len1; { - char c, *olds; + char c; +#ifdef IS_MSDOS + char *olds; +#endif *start1 = 0; for(;;) @@ -2381,9 +2390,9 @@ static void goonordie() static void doreps() { char *fstart; - int k, printaliased = 0, alias; + int k, printaliased = 0, alias = 0; REP *first, *p; - long aliaslen; + long aliaslen = 0l; #ifdef IS_MSDOS ctrlbrk(breakrep); @@ -2401,11 +2410,12 @@ static void doreps() } strcpy(fullrep, p->r_hto->h_name); strcat(fullrep, p->r_nto); - if (!noex && (p->r_flags & R_ISCYCLE)) + if (!noex && (p->r_flags & R_ISCYCLE)) { if (op & APPEND) aliaslen = appendalias(first, p, &printaliased); else alias = movealias(first, p, &printaliased); + } strcpy(pathbuf, p->r_hfrom->h_name); fstart = pathbuf + strlen(pathbuf); if ((p->r_flags & R_ISALIASED) && !(op & APPEND)) @@ -2464,7 +2474,7 @@ static long appendalias(first, p, pprintaliased) REP *first, *p; int *pprintaliased; { - long ret; + long ret = 0l; #ifdef IS_MSDOS int fd; @@ -2631,9 +2641,10 @@ static int copy(ff, len) FILEINFO *ff; off_t len; { - char buf[BUFSIZE], c; + char buf[BUFSIZE]; int f, t, k, mode, perm; #ifdef IS_MSDOS + char c; struct ftime tim; #else #ifdef IS_SYSV