diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2008-01-16 15:41:50 +0100 |
---|---|---|
committer | Paolo Bonzini <bonzini@gnu.org> | 2008-01-16 15:42:04 +0100 |
commit | 30bdbe1e61b7c34ad1faf75e9c11b079d082b915 (patch) | |
tree | fef10353c33411e7aab88e773c2f19239f0de18f /sed | |
parent | 1d66f2f7f681da73be89b9cfc11ed2da6aa11982 (diff) | |
download | sed-30bdbe1e61b7c34ad1faf75e9c11b079d082b915.tar.gz |
Parenthesize assignment used as "for-loop" expression.
2008-01-16 Jim Meyering <meyering@redhat.com>
* sed/execute.c (open_next_file, get_backup_file_name): Avoid
warnings from gcc.
Diffstat (limited to 'sed')
-rw-r--r-- | sed/execute.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sed/execute.c b/sed/execute.c index 050198a..5407010 100644 --- a/sed/execute.c +++ b/sed/execute.c @@ -1,5 +1,5 @@ /* GNU SED, a batch stream editor. - Copyright (C) 1989,90,91,92,93,94,95,98,99,2002,2003,2004,2005,2006 + Copyright (C) 1989,90,91,92,93,94,95,98,99,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -657,7 +657,7 @@ get_backup_file_name(name) /* Compute the length of the backup file */ for (asterisk = in_place_extension - 1, old_asterisk = asterisk + 1; - asterisk = strchr(old_asterisk, '*'); + (asterisk = strchr(old_asterisk, '*')); old_asterisk = asterisk + 1) backup_length += name_length - 1; @@ -665,7 +665,7 @@ get_backup_file_name(name) /* Each iteration gobbles up to an asterisk */ for (asterisk = in_place_extension - 1, old_asterisk = asterisk + 1; - asterisk = strchr(old_asterisk, '*'); + (asterisk = strchr(old_asterisk, '*')); old_asterisk = asterisk + 1) { MEMCPY (p, old_asterisk, asterisk - old_asterisk); @@ -717,7 +717,7 @@ open_next_file(name, input) /* get the base name */ tmpdir = ck_strdup(input->in_file_name); - if (p = strrchr(tmpdir, '/')) + if ((p = strrchr(tmpdir, '/'))) *(p + 1) = 0; else strcpy(tmpdir, "."); |