From 091cfde2a231dab232e623dae644b666be11cf8b Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Tue, 13 Mar 2018 14:04:28 +0100 Subject: [PATCH 1/2] silence compiler warning --- src/StreamEpics.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/StreamEpics.cc b/src/StreamEpics.cc index 9117fd9..8b22dcd 100644 --- a/src/StreamEpics.cc +++ b/src/StreamEpics.cc @@ -1120,7 +1120,7 @@ bool Stream:: matchValue(const StreamFormat& format, const void* fieldaddress) { // this function must increase consumedInput - long consumed; + long consumed = 0; long lval; double dval; char* buffer; From 76115ae95912a39ce7a916a1e752a2ad6ddfe628 Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Tue, 13 Mar 2018 14:05:37 +0100 Subject: [PATCH 2/2] silence C++11 compiler warning --- src/StreamBuffer.cc | 2 +- src/StreamCore.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/StreamBuffer.cc b/src/StreamBuffer.cc index 3b34de3..6e25f7e 100644 --- a/src/StreamBuffer.cc +++ b/src/StreamBuffer.cc @@ -314,7 +314,7 @@ dump() const StreamBuffer result(256+cap*5); result.append("\033[0m"); size_t i; - result.print("%"P"d,%"P"d,%"P"d:\033[37m", offs, len, cap); + result.print("%" P "d,%" P "d,%" P "d:\033[37m", offs, len, cap); for (i = 0; i < cap; i++) { if (i == offs) result.append("\033[34m[\033[0m"); diff --git a/src/StreamCore.cc b/src/StreamCore.cc index 4154fa6..9eb2983 100644 --- a/src/StreamCore.cc +++ b/src/StreamCore.cc @@ -997,7 +997,7 @@ readCallback(StreamIoStatus status, finishProtocol(ReplyTimeout); return 0; case StreamIoFault: - error("%s: I/O error after reading %"P"d byte%s: \"%s%s\"\n", + error("%s: I/O error after reading %" P "d byte%s: \"%s%s\"\n", name(), inputBuffer.length(), inputBuffer.length()==1 ? "" : "s", inputBuffer.length() > 20 ? "..." : "", @@ -1006,7 +1006,7 @@ readCallback(StreamIoStatus status, return 0; } inputBuffer.append(input, size); - debug("StreamCore::readCallback(%s) inputBuffer=\"%s\", size %"P"d\n", + debug("StreamCore::readCallback(%s) inputBuffer=\"%s\", size %" P "d\n", name(), inputBuffer.expand()(), inputBuffer.length()); if (*activeCommand != in_cmd) {