Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix compiler warning about uninitialized warning.

The variable 'port' is used uninitialized whenever '&&' condition is false.
  • Loading branch information...
commit e260013313ba88943281df70c9ec3ac8934eaf6c 1 parent 190b0b4
Matthias Vallentin mavam authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  examples/group_server.cpp
2  examples/group_server.cpp
@@ -34,7 +34,7 @@ auto on_void_opt(char short_opt, const char* long_opt) -> decltype(on<string>().
34 34 }
35 35
36 36 int main(int argc, char** argv) {
37   - uint16_t port;
  37 + uint16_t port = 0;
38 38 bool args_valid = argc > 1 && match_stream<string>(argv + 1, argv + argc) (
39 39 on_opt('p', "port") >> [&](const string& arg) -> bool {
40 40 if (!(istringstream(arg) >> port)) {

0 comments on commit e260013

Please sign in to comment.
Something went wrong with that request. Please try again.