Permalink
Browse files

Fix compiler warning about uninitialized warning.

The variable 'port' is used uninitialized whenever '&&' condition is false.
  • Loading branch information...
1 parent 190b0b4 commit e260013313ba88943281df70c9ec3ac8934eaf6c @mavam mavam committed Sep 5, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 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)) {

0 comments on commit e260013

Please sign in to comment.