From fe38f7a9a99587d2777885d4e8f8ec69f199a0bf Mon Sep 17 00:00:00 2001 From: Larry Doolittle Date: Sun, 16 Nov 2008 13:10:58 -0800 Subject: [PATCH] Quiet compiler warnings Eliminate three "warning: suggest parentheses around assignment used as truth value" Obviously not needed, but it's easier to add the superfluous parentheses than remember that these warnings are benign. --- vvp/vpip_bin.cc | 2 +- vvp/vpip_hex.cc | 2 +- vvp/vpip_oct.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vvp/vpip_bin.cc b/vvp/vpip_bin.cc index 0deff0327..ecbcd9eb6 100644 --- a/vvp/vpip_bin.cc +++ b/vvp/vpip_bin.cc @@ -35,7 +35,7 @@ void vpip_bin_str_to_vec4(vvp_vector4_t&vec4, const char*buf) unsigned skip_chars = 0; const char*tbuf = buf; /* Find the number of non-numeric characters. */ - while (tbuf = strpbrk(tbuf, "-_")) { + while ((tbuf = strpbrk(tbuf, "-_"))) { skip_chars += 1; tbuf += 1; } diff --git a/vvp/vpip_hex.cc b/vvp/vpip_hex.cc index cd7004ebd..3846ac235 100644 --- a/vvp/vpip_hex.cc +++ b/vvp/vpip_hex.cc @@ -36,7 +36,7 @@ void vpip_hex_str_to_vec4(vvp_vector4_t&val, const char*str) unsigned skip_chars = 0; const char*tstr = str; /* Find the number of non-numeric characters. */ - while (tstr = strpbrk(tstr, "-_")) { + while ((tstr = strpbrk(tstr, "-_"))) { skip_chars += 1; tstr += 1; } diff --git a/vvp/vpip_oct.cc b/vvp/vpip_oct.cc index 90efed18a..0b28e102e 100644 --- a/vvp/vpip_oct.cc +++ b/vvp/vpip_oct.cc @@ -36,7 +36,7 @@ void vpip_oct_str_to_vec4(vvp_vector4_t&val, const char*str) unsigned skip_chars = 0; const char*tstr = str; /* Find the number of non-numeric characters. */ - while (tstr = strpbrk(tstr, "-_")) { + while ((tstr = strpbrk(tstr, "-_"))) { skip_chars += 1; tstr += 1; }