summaryrefslogtreecommitdiffstats
path: root/lib/libcurses
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-07-12 18:57:58 +0000
committerjkh <jkh@FreeBSD.org>1996-07-12 18:57:58 +0000
commitc4d4a99d31762beef936f34571330923e9300da9 (patch)
treec116431af8e1f042b25e0f70c63c437cf7ff8d63 /lib/libcurses
parent6657f01bfd009bbf4ec0481a17712259abf8ea77 (diff)
downloadFreeBSD-src-c4d4a99d31762beef936f34571330923e9300da9.zip
FreeBSD-src-c4d4a99d31762beef936f34571330923e9300da9.tar.gz
General -Wall warning cleanup, part I.
Submitted-By: Kent Vander Velden <graphix@iastate.edu>
Diffstat (limited to 'lib/libcurses')
-rw-r--r--lib/libcurses/cr_put.c2
-rw-r--r--lib/libcurses/cur_hash.c2
-rw-r--r--lib/libcurses/refresh.c4
-rw-r--r--lib/libcurses/setterm.c6
4 files changed, 7 insertions, 7 deletions
diff --git a/lib/libcurses/cr_put.c b/lib/libcurses/cr_put.c
index b69b01a..f17bb2a 100644
--- a/lib/libcurses/cr_put.c
+++ b/lib/libcurses/cr_put.c
@@ -298,7 +298,7 @@ plod(cnt, in_refresh)
* If it will be cheaper, or if we can't back up, then send a return
* preliminarily.
*/
- if (j > i + 1 || outcol > destcol && !BS && !BC) {
+ if ((j > i + 1) || (outcol > destcol && !BS && !BC)) {
/*
* BUG: this doesn't take the (possibly long) length of CR
* into account.
diff --git a/lib/libcurses/cur_hash.c b/lib/libcurses/cur_hash.c
index de6ab11..b358184 100644
--- a/lib/libcurses/cur_hash.c
+++ b/lib/libcurses/cur_hash.c
@@ -52,7 +52,7 @@ __hash(s, len)
i = 0;
while (i < len) {
h = (h << 4) + s[i];
- if (g = h & 0xf0000000) {
+ if ( (g = h & 0xf0000000) ) {
h = h ^ (g >> 24);
h = h ^ g;
}
diff --git a/lib/libcurses/refresh.c b/lib/libcurses/refresh.c
index 6350f1f..1719454 100644
--- a/lib/libcurses/refresh.c
+++ b/lib/libcurses/refresh.c
@@ -745,7 +745,7 @@ scrolln(starts, startw, curs, bot, top)
if (n > 0) {
/* Scroll up the screen. */
- if ((!DB && SF != NULL || n == 1) && bot == curscr->maxy - 1 && top == 0) {
+ if (((!DB && SF != NULL) || n == 1) && (bot == curscr->maxy - 1) && top == 0) {
__mvcur(oy, ox, curscr->maxy - 1, 0, 1);
if (n == 1)
goto f_nl1;
@@ -807,7 +807,7 @@ scrolln(starts, startw, curs, bot, top)
/* Scroll down the screen. */
if (!DA && (SR != NULL || sr != NULL) && bot == curscr->maxy - 1 && top == 0) {
__mvcur(oy, ox, 0, 0, 1);
- if (SR == NULL || sr != NULL && -n == 1) {
+ if (SR == NULL || (sr != NULL && -n == 1)) {
for (i = n; i < 0; i++)
tputs(sr, 1, __cputchar);
} else
diff --git a/lib/libcurses/setterm.c b/lib/libcurses/setterm.c
index 14ce6ee..252c599 100644
--- a/lib/libcurses/setterm.c
+++ b/lib/libcurses/setterm.c
@@ -156,13 +156,13 @@ setterm(type)
ttytype = longname(genbuf, __ttytype);
__usecs =
- (AL == NULL && al == NULL || DL == NULL && dl == NULL) &&
- !NS && (SC != NULL && RC != NULL || HO != NULL) &&
+ ((AL == NULL && al == NULL) || (DL == NULL && dl == NULL)) &&
+ !NS && ((SC != NULL && RC != NULL) || HO != NULL) &&
CS != NULL && (SR != NULL || sr != NULL);
/* If no scrolling commands, no quick change. */
__noqch = !__usecs &&
- (AL == NULL && al == NULL || DL == NULL && dl == NULL);
+ ((AL == NULL && al == NULL) || (DL == NULL && dl == NULL));
return (unknown ? ERR : OK);
}
OpenPOWER on IntegriCloud