theimpossibleastronaut / modemu2k

modemu2k is a fork of modemu, a telnet client with a modem-like user interface
https://theimpossibleastronaut.com/modemu2k
GNU General Public License v3.0
10 stars 6 forks source link

warning: missing initializer for field ‘state’ of ‘TelOptState’ #34

Closed andy5995 closed 3 years ago

andy5995 commented 3 years ago

Got a few new warnings to look at after switching to meson and setting the default warning to 2.

../src/telopt.c:21:3: warning: missing initializer for field ‘state’ of ‘TelOptState’ [-Wmissing-field-initializers]
   21 |   {TELOPT_BINARY, {TOR_BETTER}, {TOR_BETTER}},  /*0 */
      |   ^
In file included from ../src/telopt.c:10:
../src/telopt.h:21:7: note: ‘state’ declared here
   21 |   int state;                    /* current state (enabled:1 or disabled:0) */
      |       ^~~~~
../src/telopt.c:21:3: warning: missing initializer for field ‘state’ of ‘TelOptState’ [-Wmissing-field-initializers]
   21 |   {TELOPT_BINARY, {TOR_BETTER}, {TOR_BETTER}},  /*0 */
      |   ^
In file included from ../src/telopt.c:10:
../src/telopt.h:21:7: note: ‘state’ declared here
   21 |   int state;                    /* current state (enabled:1 or disabled:0) */
      |       ^~~~~
../src/telopt.c:22:3: warning: missing initializer for field ‘state’ of ‘TelOptState’ [-Wmissing-field-initializers]
   22 |   {TELOPT_ECHO, {TOR_MUSTNOT}, {TOR_BETTER}},   /*1 */
      |   ^
In file included from ../src/telopt.c:10:
../src/telopt.h:21:7: note: ‘state’ declared here
   21 |   int state;                    /* current state (enabled:1 or disabled:0) */
      |       ^~~~~
../src/telopt.c:23:3: warning: missing initializer for field ‘state’ of ‘TelOptState’ [-Wmissing-field-initializers]
   23 |   {TELOPT_SGA, {TOR_BETTER}, {TOR_MUST}},       /*3 */
      |   ^
In file included from ../src/telopt.c:10:
../src/telopt.h:21:7: note: ‘state’ declared here
   21 |   int state;                    /* current state (enabled:1 or disabled:0) */
      |       ^~~~~
../src/telopt.c:23:3: warning: missing initializer for field ‘state’ of ‘TelOptState’ [-Wmissing-field-initializers]
   23 |   {TELOPT_SGA, {TOR_BETTER}, {TOR_MUST}},       /*3 */
      |   ^
In file included from ../src/telopt.c:10:
../src/telopt.h:21:7: note: ‘state’ declared here
   21 |   int state;                    /* current state (enabled:1 or disabled:0) */
      |       ^~~~~
../src/telopt.c:24:3: warning: missing initializer for field ‘state’ of ‘TelOptState’ [-Wmissing-field-initializers]
   24 |   {TELOPT_TTYPE, {TOR_NEUTRAL}, {TOR_MUSTNOT}}, /*24 */
      |   ^
In file included from ../src/telopt.c:10:
../src/telopt.h:21:7: note: ‘state’ declared here
   21 |   int state;                    /* current state (enabled:1 or disabled:0) */