Skip to content

Commit 5524d7f

Browse files
committed
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.
1 parent fbb31b5 commit 5524d7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

easywsclient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ class _RealWebSocket : public easywsclient::WebSocket
274274
ws.N0 = (data[1] & 0x7f);
275275
ws.header_size = 2 + (ws.N0 == 126? 2 : 0) + (ws.N0 == 127? 8 : 0) + (ws.mask? 4 : 0);
276276
if (rxbuf.size() < ws.header_size) { return; /* Need: ws.header_size - rxbuf.size() */ }
277-
int i;
277+
int i = 0;
278278
if (ws.N0 < 126) {
279279
ws.N = ws.N0;
280280
i = 2;

0 commit comments

Comments
 (0)