From owner-freebsd-current@FreeBSD.ORG Sat Jun 29 15:59:02 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 68BEE9EC for ; Sat, 29 Jun 2013 15:59:02 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) by mx1.freebsd.org (Postfix) with ESMTP id 356AF1B47 for ; Sat, 29 Jun 2013 15:59:01 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id r5TFx1IL058529; Sat, 29 Jun 2013 15:59:01 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.123] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id z74pwnx72i74qe5kzty6k8c7a2; Sat, 29 Jun 2013 15:59:01 +0000 (UTC) (envelope-from tim@kientzle.com) Subject: Re: another -Wunsequenced topic Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=us-ascii From: Tim Kientzle In-Reply-To: <51CEEC34.2010308@gmx.com> Date: Sat, 29 Jun 2013 08:59:01 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <51CEEC34.2010308@gmx.com> To: dt71@gmx.com X-Mailer: Apple Mail (2.1283) Cc: freebsd-current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jun 2013 15:59:02 -0000 Thanks! I've committed all of these except the change to contrib/bmake/ which should probably be submitted upstream first. Tim On Jun 29, 2013, at 7:16 AM, dt71@gmx.com wrote: > Here's a patch to fix several compilation errors coming from = -Wunsequenced warnings: >=20 > Index: bin/ed/re.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- bin/ed/re.c (revision 252372) > +++ bin/ed/re.c (working copy) > @@ -89,7 +89,7 @@ > default: > break; > case '[': > - if ((nd =3D parse_char_class(++nd)) =3D=3D NULL) = { > + if ((nd =3D parse_char_class(nd + 1)) =3D=3D = NULL) { > errmsg =3D "unbalanced brackets ([])"; > return NULL; > } > Index: contrib/bmake/meta.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- contrib/bmake/meta.c (revision 252372) > +++ contrib/bmake/meta.c (working copy) > @@ -1249,7 +1249,7 @@ > warnx("%s: %d: line truncated at %u", = fname, lineno, x); > break; > } > - cp =3D strchr(++cp, '\n'); > + cp =3D strchr(cp + 1, '\n'); > } while (cp); > if (buf[x - 1] =3D=3D '\n') > buf[x - 1] =3D '\0'; > Index: lib/libfetch/fetch.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- lib/libfetch/fetch.c (revision 252372) > +++ lib/libfetch/fetch.c (working copy) > @@ -376,7 +376,7 @@ > /* password */ > if (*q =3D=3D ':') > - q =3D fetch_pctdecode(u->pwd, ++q, URL_PWDLEN); > + q =3D fetch_pctdecode(u->pwd, q + 1, = URL_PWDLEN); > p++; > } else { > Index: lib/libutil/login_times.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- lib/libutil/login_times.c (revision 252372) > +++ lib/libutil/login_times.c (working copy) > @@ -96,7 +96,7 @@ > else > m.lt_start =3D 0; > if (*p =3D=3D '-') > - p =3D parse_time(++p, &m.lt_end); > + p =3D parse_time(p + 1, &m.lt_end); > else > m.lt_end =3D 1440; > Index: usr.sbin/newsyslog/newsyslog.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- usr.sbin/newsyslog/newsyslog.c (revision 252372) > +++ usr.sbin/newsyslog/newsyslog.c (working copy) > @@ -1083,7 +1083,7 @@ > * at any time, etc). > */ > if (strcasecmp(DEBUG_MARKER, q) =3D=3D 0) { > - q =3D parse =3D missing_field(sob(++parse), = errline); > + q =3D parse =3D missing_field(sob(parse + 1), = errline); > parse =3D son(parse); > if (!*parse) > warnx("debug line specifies no = option:\n%s", > @@ -1096,7 +1096,7 @@ > } else if (strcasecmp(INCLUDE_MARKER, q) =3D=3D 0) { > if (verbose) > printf("Found: %s", errline); > - q =3D parse =3D missing_field(sob(++parse), = errline); > + q =3D parse =3D missing_field(sob(parse + 1), = errline); > parse =3D son(parse); > if (!*parse) { > warnx("include line missing = argument:\n%s", > @@ -1138,7 +1138,7 @@ > defconf_p =3D working; > } > - q =3D parse =3D missing_field(sob(++parse), errline); > + q =3D parse =3D missing_field(sob(parse + 1), errline); > parse =3D son(parse); > if (!*parse) > errx(1, "malformed line (missing fields):\n%s", > @@ -1172,7 +1172,7 @@ > } else > working->gid =3D (gid_t)-1; > - q =3D parse =3D missing_field(sob(++parse), = errline); > + q =3D parse =3D missing_field(sob(parse + 1), = errline); > parse =3D son(parse); > if (!*parse) > errx(1, "malformed line (missing = fields):\n%s", > @@ -1187,7 +1187,7 @@ > errx(1, "error in config file; bad = permissions:\n%s", > errline); > - q =3D parse =3D missing_field(sob(++parse), errline); > + q =3D parse =3D missing_field(sob(parse + 1), errline); > parse =3D son(parse); > if (!*parse) > errx(1, "malformed line (missing fields):\n%s", > @@ -1197,7 +1197,7 @@ > errx(1, "error in config file; bad value for = count of logs to save:\n%s", > errline); > - q =3D parse =3D missing_field(sob(++parse), errline); > + q =3D parse =3D missing_field(sob(parse + 1), errline); > parse =3D son(parse); > if (!*parse) > errx(1, "malformed line (missing fields):\n%s", > @@ -1215,7 +1215,7 @@ > working->flags =3D 0; > working->compress =3D COMPRESS_NONE; > - q =3D parse =3D missing_field(sob(++parse), errline); > + q =3D parse =3D missing_field(sob(parse + 1), errline); > parse =3D son(parse); > eol =3D !*parse; > *parse =3D '\0'; > @@ -1257,7 +1257,7 @@ > if (eol) > q =3D NULL; > else { > - q =3D parse =3D sob(++parse); /* Optional = field */ > + q =3D parse =3D sob(parse + 1); /* Optional = field */ > parse =3D son(parse); > if (!*parse) > eol =3D 1; > @@ -1327,7 +1327,7 @@ > if (eol) > q =3D NULL; > else { > - q =3D parse =3D sob(++parse); /* Optional = field */ > + q =3D parse =3D sob(parse + 1); /* Optional = field */ > parse =3D son(parse); > if (!*parse) > eol =3D 1; > @@ -1348,7 +1348,7 @@ > if (eol) > q =3D NULL; > else { > - q =3D parse =3D sob(++parse); /* Optional = field */ > + q =3D parse =3D sob(parse + 1); /* Optional = field */ > *(parse =3D son(parse)) =3D '\0'; > } > Index: usr.sbin/pw/pw_user.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- usr.sbin/pw/pw_user.c (revision 252372) > +++ usr.sbin/pw/pw_user.c (working copy) > @@ -200,7 +200,7 @@ > strlcpy(dbuf, cnf->home, sizeof(dbuf)); > p =3D dbuf; > if (stat(dbuf, &st) =3D=3D -1) { > - while ((p =3D strchr(++p, '/')) !=3D = NULL) { > + while ((p =3D strchr(p + 1, '/')) !=3D = NULL) { > *p =3D '\0'; > if (stat(dbuf, &st) =3D=3D -1) { > if (mkdir(dbuf, = _DEF_DIRMODE) =3D=3D -1) > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to = "freebsd-current-unsubscribe@freebsd.org"