Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix compiler warning about uninitialized warning.

The variable 'port' is used uninitialized whenever '&&' condition is false.
  • Loading branch information...
commit e260013313ba88943281df70c9ec3ac8934eaf6c 1 parent 190b0b4
@mavam mavam authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  examples/group_server.cpp
View
2  examples/group_server.cpp
@@ -34,7 +34,7 @@ auto on_void_opt(char short_opt, const char* long_opt) -> decltype(on<string>().
}
int main(int argc, char** argv) {
- uint16_t port;
+ uint16_t port = 0;
bool args_valid = argc > 1 && match_stream<string>(argv + 1, argv + argc) (
on_opt('p', "port") >> [&](const string& arg) -> bool {
if (!(istringstream(arg) >> port)) {
Please sign in to comment.
Something went wrong with that request. Please try again.