]> diplodocus.org Git - nmh/blobdiff - uip/mhlsbr.c
Disable assertions by default.
[nmh] / uip / mhlsbr.c
index 82e65d77f26301ee5bca976aba791df49e23017e..0788d1ef77600feb0fcf5dbfa6acb95838c2fde1 100644 (file)
@@ -877,6 +877,8 @@ process (char *folder, char *fname, int ofilen, int ofilec)
     struct mcomp *c1;
     struct stat st;
     struct arglist *ap;
+    /* volatile to prevent "might be clobbered" warning from gcc: */
+    char *volatile fname2 = fname ? fname : "(stdin)";
 
     switch (setjmp (env)) {
        case OK: 
@@ -888,7 +890,6 @@ process (char *folder, char *fname, int ofilen, int ofilec)
                    return;
                }
            } else {
-               fname = "(stdin)";
                fp = stdin;
            }
            if (fstat(fileno(fp), &st) == 0) {
@@ -896,7 +897,7 @@ process (char *folder, char *fname, int ofilen, int ofilec)
            } else {
                filesize = 0;
            }
-           cp = folder ? concat (folder, ":", fname, NULL) : getcpy (fname);
+           cp = folder ? concat (folder, ":", fname2, NULL) : getcpy (fname2);
            if (ontty != PITTY)
                SIGNAL (SIGINT, intrser);
            mhlfile (fp, cp, ofilen, ofilec);  /* FALL THROUGH! */
@@ -1179,7 +1180,7 @@ mcomp_format (struct mcomp *c1, struct mcomp *c2)
        if ((p = (struct pqpair *) calloc ((size_t) 1, sizeof(*p))) == NULL)
            adios (NULL, "unable to allocate pqpair memory");
 
-       if ((mp = getm (cp, NULL, 0, AD_NAME, error)) == NULL) {
+       if ((mp = getm (cp, NULL, 0, error, sizeof(error))) == NULL) {
            p->pq_text = getcpy (cp);
            p->pq_error = getcpy (error);
        } else {
@@ -1851,7 +1852,6 @@ filterbody (struct mcomp *c1, char *buf, int bufsz, int state, FILE *fp,
         * buffers that we have duplicated from the parent.
         */
        _exit(0);
-       break;
     case -1:
        adios(NULL, "Unable to fork for filter writer process");
        break;