diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2022-05-17 16:12:46 +0200 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2022-05-17 16:12:46 +0200 |
| commit | 1c04bbfea700a8a38719e9a30dd47b37bf609a3d (patch) | |
| tree | 79e814b2594ae8b388f821ef6696cc85d1e74cf6 | |
| parent | 34a4541114318a7eda1c96ed58f83cdcd2622207 (diff) | |
Get rid of some warnings
| -rwxr-xr-x | vchat-client.c | 6 | ||||
| -rwxr-xr-x | vchat-commands.c | 11 | ||||
| -rwxr-xr-x | vchat-protocol.c | 6 | ||||
| -rwxr-xr-x | vchat-ui.c | 6 | ||||
| -rwxr-xr-x | vchat.h | 2 |
5 files changed, 20 insertions, 11 deletions
diff --git a/vchat-client.c b/vchat-client.c index db31c7c..39b42d9 100755 --- a/vchat-client.c +++ b/vchat-client.c | |||
| @@ -292,10 +292,10 @@ getintoption (confopt option) | |||
| 292 | #endif | 292 | #endif |
| 293 | for (i = 0; configoptions[i].type != CO_NIL; i++) | 293 | for (i = 0; configoptions[i].type != CO_NIL; i++) |
| 294 | if ((configoptions[i].id == option) && (configoptions[i].type == CO_INT)) { | 294 | if ((configoptions[i].id == option) && (configoptions[i].type == CO_INT)) { |
| 295 | if ((uintptr_t)configoptions[i].value == -1) | 295 | if ((intptr_t)configoptions[i].value == -1) |
| 296 | return (uintptr_t) configoptions[i].defaultvalue; | 296 | return (intptr_t) configoptions[i].defaultvalue; |
| 297 | else | 297 | else |
| 298 | return (uintptr_t) configoptions[i].value; | 298 | return (intptr_t) configoptions[i].value; |
| 299 | } | 299 | } |
| 300 | return 0; | 300 | return 0; |
| 301 | } | 301 | } |
diff --git a/vchat-commands.c b/vchat-commands.c index dc46b9c..1b69a94 100755 --- a/vchat-commands.c +++ b/vchat-commands.c | |||
| @@ -141,7 +141,7 @@ translatecommand( char **cmd) | |||
| 141 | 141 | ||
| 142 | /* handle thought */ | 142 | /* handle thought */ |
| 143 | static void | 143 | static void |
| 144 | dothink( char *tail, char nice ) | 144 | dothink(const char *tail, const char nice ) |
| 145 | { | 145 | { |
| 146 | while( *tail == ' ' ) tail++; | 146 | while( *tail == ' ' ) tail++; |
| 147 | 147 | ||
| @@ -157,7 +157,7 @@ dothink( char *tail, char nice ) | |||
| 157 | 157 | ||
| 158 | /* handle action */ | 158 | /* handle action */ |
| 159 | static void | 159 | static void |
| 160 | doaction( char *tail ) | 160 | doaction(const char *tail ) |
| 161 | { | 161 | { |
| 162 | while( *tail == ' ' ) tail++; | 162 | while( *tail == ' ' ) tail++; |
| 163 | 163 | ||
| @@ -177,7 +177,7 @@ doaction( char *tail ) | |||
| 177 | 177 | ||
| 178 | /* handle private message outgoing */ | 178 | /* handle private message outgoing */ |
| 179 | static void | 179 | static void |
| 180 | privatemessagetx ( char *tail ) { | 180 | privatemessagetx (char *tail ) { |
| 181 | char *mesg; | 181 | char *mesg; |
| 182 | 182 | ||
| 183 | /* find nick */ | 183 | /* find nick */ |
| @@ -406,6 +406,7 @@ command_rmflt (char *tail) { | |||
| 406 | /* list filters */ | 406 | /* list filters */ |
| 407 | static void | 407 | static void |
| 408 | command_lsflt (char *tail) { | 408 | command_lsflt (char *tail) { |
| 409 | (void)tail; | ||
| 409 | listfilters(); | 410 | listfilters(); |
| 410 | } | 411 | } |
| 411 | 412 | ||
| @@ -413,13 +414,14 @@ command_lsflt (char *tail) { | |||
| 413 | static void | 414 | static void |
| 414 | command_action(char *tail) | 415 | command_action(char *tail) |
| 415 | { | 416 | { |
| 416 | doaction( tail); | 417 | doaction(tail); |
| 417 | } | 418 | } |
| 418 | 419 | ||
| 419 | /* handle a "/reconnect" request */ | 420 | /* handle a "/reconnect" request */ |
| 420 | static void | 421 | static void |
| 421 | command_reconnect(char *tail) | 422 | command_reconnect(char *tail) |
| 422 | { | 423 | { |
| 424 | (void)tail; | ||
| 423 | status = 0; | 425 | status = 0; |
| 424 | wantreconnect = 1; | 426 | wantreconnect = 1; |
| 425 | ownquit = 0; | 427 | ownquit = 0; |
| @@ -446,6 +448,7 @@ command_quit(char *tail) | |||
| 446 | void | 448 | void |
| 447 | command_version(char *tail) | 449 | command_version(char *tail) |
| 448 | { | 450 | { |
| 451 | (void)tail; | ||
| 449 | /* output internal versions of all modules */ | 452 | /* output internal versions of all modules */ |
| 450 | flushout(); | 453 | flushout(); |
| 451 | writeout (vchat_cl_version); | 454 | writeout (vchat_cl_version); |
diff --git a/vchat-protocol.c b/vchat-protocol.c index 77e45ec..2b98779 100755 --- a/vchat-protocol.c +++ b/vchat-protocol.c | |||
| @@ -116,7 +116,8 @@ pubthoughts (char *message) | |||
| 116 | static void | 116 | static void |
| 117 | serverlogin (char *message) | 117 | serverlogin (char *message) |
| 118 | { | 118 | { |
| 119 | int utf8=!strcmp(nl_langinfo(CODESET), "UTF-8"); | 119 | (void)message; |
| 120 | int utf8 = !strcmp(nl_langinfo(CODESET), "UTF-8"); | ||
| 120 | if (utf8) | 121 | if (utf8) |
| 121 | vc_sendmessage(".e utf8"); | 122 | vc_sendmessage(".e utf8"); |
| 122 | } | 123 | } |
| @@ -262,8 +263,9 @@ ownjoin (int channel) | |||
| 262 | 263 | ||
| 263 | /* this user changes his nick */ | 264 | /* this user changes his nick */ |
| 264 | void | 265 | void |
| 265 | ownnickchange (char *newnick) | 266 | ownnickchange (const char *newnick) |
| 266 | { | 267 | { |
| 268 | (void)newnick; | ||
| 267 | } | 269 | } |
| 268 | 270 | ||
| 269 | /* parse and handle a nick error message | 271 | /* parse and handle a nick error message |
| @@ -112,7 +112,7 @@ static int currentstamp = 0; | |||
| 112 | 112 | ||
| 113 | static void resize (int); | 113 | static void resize (int); |
| 114 | static void forceredraw (void); | 114 | static void forceredraw (void); |
| 115 | static void forceredraw_wrapper (int a) {forceredraw();} | 115 | static void forceredraw_wrapper (int a) {(void)a; forceredraw();} |
| 116 | static void drawwin (WINDOW *win, struct sb_data *sb); | 116 | static void drawwin (WINDOW *win, struct sb_data *sb); |
| 117 | static int writescr (WINDOW *win, struct sb_entry *entry); | 117 | static int writescr (WINDOW *win, struct sb_entry *entry); |
| 118 | static int testfilter ( struct sb_entry *entry); | 118 | static int testfilter ( struct sb_entry *entry); |
| @@ -760,6 +760,7 @@ void | |||
| 760 | resize (int signal) | 760 | resize (int signal) |
| 761 | { | 761 | { |
| 762 | int xsize,ysize,topicheight=topic?1:0; | 762 | int xsize,ysize,topicheight=topic?1:0; |
| 763 | (void)signal; | ||
| 763 | 764 | ||
| 764 | ttgtsz(&xsize,&ysize); | 765 | ttgtsz(&xsize,&ysize); |
| 765 | resizeterm(ysize,xsize); | 766 | resizeterm(ysize,xsize); |
| @@ -1383,6 +1384,8 @@ passprompt (char *buf, int size, int rwflag, void *userdata) | |||
| 1383 | { | 1384 | { |
| 1384 | int i; | 1385 | int i; |
| 1385 | char *passphrase = NULL; | 1386 | char *passphrase = NULL; |
| 1387 | (void)rwflag; | ||
| 1388 | (void)userdata; | ||
| 1386 | 1389 | ||
| 1387 | /* use special non-revealing redraw function */ | 1390 | /* use special non-revealing redraw function */ |
| 1388 | /* FIXME: passphrase isn't protected against e.g. swapping */ | 1391 | /* FIXME: passphrase isn't protected against e.g. swapping */ |
| @@ -1476,6 +1479,7 @@ removefromfilterlist( int(*test)(filt *flt, void *data, char colour), void *data | |||
| 1476 | 1479 | ||
| 1477 | static int | 1480 | static int |
| 1478 | test_clear( filt *flt, void *data, char c ) { | 1481 | test_clear( filt *flt, void *data, char c ) { |
| 1482 | (void)data; | ||
| 1479 | if( !c || ( c == flt->colour ) || ( (c == '*') && (flt->colour != '-') && (flt->colour != '+') ) ) | 1483 | if( !c || ( c == flt->colour ) || ( (c == '*') && (flt->colour != '-') && (flt->colour != '+') ) ) |
| 1480 | return RMFILTER_RMANDCONT; | 1484 | return RMFILTER_RMANDCONT; |
| 1481 | else | 1485 | else |
| @@ -147,7 +147,7 @@ void protocol_parsemsg (char *message); | |||
| 147 | /* helpers for vchat-user.c */ | 147 | /* helpers for vchat-user.c */ |
| 148 | void ownjoin (int channel); | 148 | void ownjoin (int channel); |
| 149 | void ownleave (int channel); | 149 | void ownleave (int channel); |
| 150 | void ownnickchange (char *newnick); | 150 | void ownnickchange (const char *newnick); |
| 151 | 151 | ||
| 152 | /* vchat-commands.c */ | 152 | /* vchat-commands.c */ |
| 153 | extern const char *vchat_cm_version; | 153 | extern const char *vchat_cm_version; |
