Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src avoid code that looks like this:



details:   https://anonhg.NetBSD.org/src/rev/e2e39a5796c2
branches:  trunk
changeset: 766384:e2e39a5796c2
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Jun 21 09:36:46 2011 +0000

description:
avoid code that looks like this:
        x = x = y;
since GCC 4.5 complains about it having sequence point issues.

diffstat:

 sbin/fsck_lfs/lfs.c                |  5 ++---
 usr.sbin/acpitools/aml/aml_parse.c |  6 +++---
 2 files changed, 5 insertions(+), 6 deletions(-)

diffs (46 lines):

diff -r 5fc7f22d45a0 -r e2e39a5796c2 sbin/fsck_lfs/lfs.c
--- a/sbin/fsck_lfs/lfs.c       Tue Jun 21 09:36:43 2011 +0000
+++ b/sbin/fsck_lfs/lfs.c       Tue Jun 21 09:36:46 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs.c,v 1.33 2010/02/21 16:24:21 mlelstv Exp $ */
+/* $NetBSD: lfs.c,v 1.34 2011/06/21 09:36:46 mrg Exp $ */
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -1020,8 +1020,7 @@
                                                    lastblock,
                                                    (bpp ? &bp : NULL))))
                                return (error);
-                       ip->i_ffs1_size = ip->i_ffs1_size =
-                           (lastblock + 1) * fs->lfs_bsize;
+                       ip->i_ffs1_size = (lastblock + 1) * fs->lfs_bsize;
                        ip->i_flag |= IN_CHANGE | IN_UPDATE;
                        if (bpp)
                                (void) VOP_BWRITE(bp);
diff -r 5fc7f22d45a0 -r e2e39a5796c2 usr.sbin/acpitools/aml/aml_parse.c
--- a/usr.sbin/acpitools/aml/aml_parse.c        Tue Jun 21 09:36:43 2011 +0000
+++ b/usr.sbin/acpitools/aml/aml_parse.c        Tue Jun 21 09:36:46 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aml_parse.c,v 1.2 2011/05/30 01:15:30 dyoung Exp $     */
+/*     $NetBSD: aml_parse.c,v 1.3 2011/06/21 09:36:46 mrg Exp $        */
 
 /*-
  * Copyright (c) 1999 Doug Rabson
@@ -30,7 +30,7 @@
  *     $FreeBSD: src/usr.sbin/acpi/amldb/aml/aml_parse.c,v 1.7 2001/10/23 14:54:15 takawata Exp $
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: aml_parse.c,v 1.2 2011/05/30 01:15:30 dyoung Exp $");
+__RCSID("$NetBSD: aml_parse.c,v 1.3 2011/06/21 09:36:46 mrg Exp $");
 
 #include <sys/param.h>
 
@@ -798,7 +798,7 @@
        aml_print_namestring(name = aml_parse_namestring(env));
        fieldtemplate.type = aml_t_field;
        flags = aml_parse_bytedata(env);
-       fieldtemplate.flags = fieldtemplate.flags = flags;
+       fieldtemplate.flags = flags;
 
        *copy = *env;
        env->dp = copy->end = start + pkglength;



Home | Main Index | Thread Index | Old Index