[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-cpio] [PATCH] Fix compiler warning
From: |
Petr Uzel |
Subject: |
[Bug-cpio] [PATCH] Fix compiler warning |
Date: |
Tue, 10 Aug 2010 17:58:38 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
* src/mt.c (parse_opt): Split assignment and comparison so that
the compiler does not complain about possibly undefined operation.
---
src/mt.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/mt.c b/src/mt.c
index e442e08..93ca7b3 100644
--- a/src/mt.c
+++ b/src/mt.c
@@ -208,7 +208,8 @@ parse_opt (int key, char *arg, struct argp_state *state)
{
char *p;
long val = strtol (arg, &p, 0);
- if (*p || (count = val) != count)
+ count = val;
+ if (*p || val != count)
error (MT_EXIT_INVOP, 0, _("invalid count value"));
}
break;
--
1.7.1
Petr
--
Petr Uzel
IRC: ptr_uzl @ freenode
pgpZKRgqv6NT1.pgp
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-cpio] [PATCH] Fix compiler warning,
Petr Uzel <=