fix -Wparentheses warning

Signed-off-by: Masanori Ogino <mogino@acm.org>
This commit is contained in:
SASANO Takayoshi 2023-11-29 21:18:00 +09:00 • committed by Masanori Ogino
commit 7ed78cdf8d
4 changed files with 35 additions and 35 deletions

View file

@ -77,7 +77,7 @@ unsigned char *s;
unsigned short i;
unsigned char *d = s;
while (i = *s++) {
while ((i = *s++)) {
if (iseuckana(i)) {
if (*s) {
*d++ = *s++;

View file

@ -153,7 +153,7 @@ char *input;
fp = stdin;
while (fgets((char *)buf, sizeof(buf), fp)) {
if (p = (unsigned char *)strchr((char *)buf, '\n'))
if ((p = (unsigned char *)strchr((char *)buf, '\n')))
*p = '\0';
else {
do {

View file

@ -104,8 +104,8 @@ main(int argc, char** argv)
make_dicname();
/* XXX: is this progname intentional? or old variable left? */
/* if (err = sj3_open(serv_name, user_name, prog_name)) */
if (err = sj3_open(serv_name, user_name))
/* if ((err = sj3_open(serv_name, user_name, prog_name))) */
if ((err = sj3_open(serv_name, user_name)))
_open_error(err);
switch (mode) {
@ -120,7 +120,7 @@ main(int argc, char** argv)
break;
}
if (err = sj3_close()) _close_error(err);
if ((err = sj3_close())) _close_error(err);
}
static void