From 191a5b09e9a286dc430a516db8091a327ef1892c Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 1 Sep 2019 21:42:40 +0200 Subject: [PATCH] bin2c: fix compilation warning --- pandatool/src/miscprogs/binToC.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pandatool/src/miscprogs/binToC.cxx b/pandatool/src/miscprogs/binToC.cxx index 6eff47c9d1..ae9fbc4090 100644 --- a/pandatool/src/miscprogs/binToC.cxx +++ b/pandatool/src/miscprogs/binToC.cxx @@ -99,8 +99,7 @@ run() { out << std::hex << std::setfill('0'); int count = 0; int col = 0; - unsigned int ch; - ch = in.get(); + int ch = in.get(); while (!in.fail() && ch != EOF) { if (col == 0) { out << "\n "; @@ -110,7 +109,7 @@ run() { } else { out << ", "; } - out << "0x" << std::setw(2) << ch; + out << "0x" << std::setw(2) << (unsigned int)ch; col++; count++; ch = in.get();