pmattes / x3270

Family of IBM 3270 emulators
46 stars 18 forks source link

a curious compiler warning #32

Closed swhobbit closed 2 years ago

swhobbit commented 2 years ago

with source:

c3270 v4.2pre2 Wed Mar 30 17:10:32 UTC 2022 ahd Build options: --enable-local-process --without-readline --with-curses-wide via gcc 4.2.1 Compatible Clang 7.0.1 (tags/RELEASE_701/final) 32-bit

clang -Wall -Wsign-compare -std=c99 -pedantic -Wno-variadic-macros -MMD -MP  -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_SOURCE -D_XOPEN_SOURCE -I../../../pr3287 -I../../../include -DLIBX3270DIR=\"/usr/local/etc/x3270\" -g -O2   -c -o ctlr.o ../../../Common/pr3287/ctlr.c
../../../Common/pr3287/ctlr.c:2164:27: warning: result of comparison of constant -1 with expression of type 'char' is always true [-Wtautological-constant-out-of-range-compare]
    while ((c = fgetc(f)) != EOF) {
           ~~~~~~~~~~~~~~ ^  ~~~
1 warning generated.
pmattes commented 2 years ago

Fixed.