]> source.dussan.org Git - tigervnc.git/commit
rdr: Fix incorrect error checking after fread()
authorSteve Kondik <shade@chemlab.org>
Sat, 8 Jul 2017 08:57:16 +0000 (01:57 -0700)
committerSteve Kondik <shade@chemlab.org>
Sat, 8 Jul 2017 09:28:12 +0000 (02:28 -0700)
commitb315dfae97c7c24b8743794bee9433c70b85b051
tree97959d4e6d13f4d9800f8ad3005c38445786fe21
parenta6424624feda6f473e49f45f8c4bc32e3523c9e0
rdr: Fix incorrect error checking after fread()

fread() returns size_t, which is unsigned. Don't check
for negative values to avoid warnings from Clang.

/home/shade/dev/tigervnc/common/rdr/FileInStream.cxx:74:13: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare]
      if (n < 0 || ferror(file))
          ~ ^ ~
common/rdr/FileInStream.cxx