From 5524d7f663ddf98a65df4771e6912d0f320d3613 Mon Sep 17 00:00:00 2001 From: Lindley French Date: Tue, 19 May 2015 14:35:27 -0700 Subject: [PATCH] Even though there is no case where i does not get initialized, the compiler doesn't always know this. Avoid a maybe-unintialized warning for i. --- easywsclient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easywsclient.cpp b/easywsclient.cpp index 266932d..a70185e 100644 --- a/easywsclient.cpp +++ b/easywsclient.cpp @@ -274,7 +274,7 @@ class _RealWebSocket : public easywsclient::WebSocket ws.N0 = (data[1] & 0x7f); ws.header_size = 2 + (ws.N0 == 126? 2 : 0) + (ws.N0 == 127? 8 : 0) + (ws.mask? 4 : 0); if (rxbuf.size() < ws.header_size) { return; /* Need: ws.header_size - rxbuf.size() */ } - int i; + int i = 0; if (ws.N0 < 126) { ws.N = ws.N0; i = 2;