Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Ignored Return Value  at chat-completion.c:656

Categories: LANG.FUNCS.IRV CWE:252 CWE:253 POW10:7
Warning ID: 2397.2411
Procedure: sig_complete_word
Trace: View
Modified: Wed Sep 2 12:25:20 2009   show details
 
Priority: None
State: None
Finding: None
Owner: None
  edit properties

Legend [ X ]
Warning Location
Contributes
Parse Error
Other Warning
Two or More Loop Iterations
On Execution Path
Comment
Macro
Preprocessor
Include
Keyword
Preprocessed Away

Source  |  Language: C Hide Legend     
LineSource
  /u1/paul/SATE/2010/c/irssi/irssi-0.8.14/src/fe-common/core/chat-completion.c
  Enter sig_complete_word
614 static void sig_complete_word(GList **list, WINDOW_REC *window,
615                               const char *word, const char *linestart,
616                               int *want_space) 
617 {
618         SERVER_REC *server;
619         CHANNEL_REC *channel;
620         QUERY_REC *query;
621         char *prefix;
622  
623         g_return_if_fail(list != NULL);
624         g_return_if_fail(window != NULL);
625         g_return_if_fail(word != NULL);
626         g_return_if_fail(linestart != NULL);
627  
628         server = window->active_server;
629         if (server == NULL && servers != NULL)
630                 server = servers->data;
631  
632         if (server != NULL && server_ischannel(server, word)) {
633                 /* probably completing a channel name */ 
634                 *list = completion_get_channels(window->active_server, word);
635                 if (*list != NULL) signal_stop();
636                 return;
637         }
638  
639         server = window->active_server;
640         if (server == NULL || !server->connected)
641                 return;
642  
643         if (*linestart == '\0' && *word == '\0') {
644                 /* pressed TAB at the start of line - add /MSG */ 
645                 prefix = g_strdup_printf("%cmsg", *cmdchars);
646                 *list = completion_msg(server, NULL, "", prefix);
647                 if (*list == NULL)
648                         *list = g_list_append(*list, g_strdup(prefix));
649                 g_free(prefix);
650  
651                 signal_stop();
652                 return;
653         }
654  
655         channel = CHANNEL(window->active);
656         query = QUERY(window->active);     /* Ignored Return Value */
657         if (channel == NULL && query != NULL &&
658             g_strncasecmp(word, query->name, strlen(word)) == 0) {
659                 /* completion in query */ 
660                 *list = g_list_append(*list, g_strdup(query->name));
661         } else if (channel != NULL) {
662                 /* nick completion .. we could also be completing a nick 
663                    after /MSG from nicks in channel */ 
664                 const char *suffix = *linestart != '\0' ? NULL : completion_char;
665                 complete_window_nicks(list, window, word, suffix);
666         } else if (window->level & MSGLEVEL_MSGS) {
667                 /* msgs window, complete /MSG nicks */ 
668                 *list = g_list_concat(completion_msg(server, NULL, word, NULL), *list);
669         }
670  
671         if (*list != NULL) signal_stop();
672 } 




Change Warning 2397.2411 : Ignored Return Value

Priority:
State:
Finding:
Owner:
Note: