From 1c04bbfea700a8a38719e9a30dd47b37bf609a3d Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Tue, 17 May 2022 16:12:46 +0200 Subject: Get rid of some warnings --- vchat-client.c | 6 +++--- vchat-commands.c | 11 +++++++---- vchat-protocol.c | 6 ++++-- vchat-ui.c | 6 +++++- 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) #endif for (i = 0; configoptions[i].type != CO_NIL; i++) if ((configoptions[i].id == option) && (configoptions[i].type == CO_INT)) { - if ((uintptr_t)configoptions[i].value == -1) - return (uintptr_t) configoptions[i].defaultvalue; + if ((intptr_t)configoptions[i].value == -1) + return (intptr_t) configoptions[i].defaultvalue; else - return (uintptr_t) configoptions[i].value; + return (intptr_t) configoptions[i].value; } return 0; } 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) /* handle thought */ static void -dothink( char *tail, char nice ) +dothink(const char *tail, const char nice ) { while( *tail == ' ' ) tail++; @@ -157,7 +157,7 @@ dothink( char *tail, char nice ) /* handle action */ static void -doaction( char *tail ) +doaction(const char *tail ) { while( *tail == ' ' ) tail++; @@ -177,7 +177,7 @@ doaction( char *tail ) /* handle private message outgoing */ static void -privatemessagetx ( char *tail ) { +privatemessagetx (char *tail ) { char *mesg; /* find nick */ @@ -406,6 +406,7 @@ command_rmflt (char *tail) { /* list filters */ static void command_lsflt (char *tail) { + (void)tail; listfilters(); } @@ -413,13 +414,14 @@ command_lsflt (char *tail) { static void command_action(char *tail) { - doaction( tail); + doaction(tail); } /* handle a "/reconnect" request */ static void command_reconnect(char *tail) { + (void)tail; status = 0; wantreconnect = 1; ownquit = 0; @@ -446,6 +448,7 @@ command_quit(char *tail) void command_version(char *tail) { + (void)tail; /* output internal versions of all modules */ flushout(); 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) static void serverlogin (char *message) { - int utf8=!strcmp(nl_langinfo(CODESET), "UTF-8"); + (void)message; + int utf8 = !strcmp(nl_langinfo(CODESET), "UTF-8"); if (utf8) vc_sendmessage(".e utf8"); } @@ -262,8 +263,9 @@ ownjoin (int channel) /* this user changes his nick */ void -ownnickchange (char *newnick) +ownnickchange (const char *newnick) { + (void)newnick; } /* parse and handle a nick error message diff --git a/vchat-ui.c b/vchat-ui.c index 745ada8..0295f2a 100755 --- a/vchat-ui.c +++ b/vchat-ui.c @@ -112,7 +112,7 @@ static int currentstamp = 0; static void resize (int); static void forceredraw (void); -static void forceredraw_wrapper (int a) {forceredraw();} +static void forceredraw_wrapper (int a) {(void)a; forceredraw();} static void drawwin (WINDOW *win, struct sb_data *sb); static int writescr (WINDOW *win, struct sb_entry *entry); static int testfilter ( struct sb_entry *entry); @@ -760,6 +760,7 @@ void resize (int signal) { int xsize,ysize,topicheight=topic?1:0; + (void)signal; ttgtsz(&xsize,&ysize); resizeterm(ysize,xsize); @@ -1383,6 +1384,8 @@ passprompt (char *buf, int size, int rwflag, void *userdata) { int i; char *passphrase = NULL; + (void)rwflag; + (void)userdata; /* use special non-revealing redraw function */ /* FIXME: passphrase isn't protected against e.g. swapping */ @@ -1476,6 +1479,7 @@ removefromfilterlist( int(*test)(filt *flt, void *data, char colour), void *data static int test_clear( filt *flt, void *data, char c ) { + (void)data; if( !c || ( c == flt->colour ) || ( (c == '*') && (flt->colour != '-') && (flt->colour != '+') ) ) return RMFILTER_RMANDCONT; else diff --git a/vchat.h b/vchat.h index 0045127..c6077a6 100755 --- a/vchat.h +++ b/vchat.h @@ -147,7 +147,7 @@ void protocol_parsemsg (char *message); /* helpers for vchat-user.c */ void ownjoin (int channel); void ownleave (int channel); -void ownnickchange (char *newnick); +void ownnickchange (const char *newnick); /* vchat-commands.c */ extern const char *vchat_cm_version; -- cgit v1.2.3