Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Uninitialized Variable  at settings.c:169

Categories: LANG.MEM.UVAR CWE:457
Warning ID: 4752.28228
Procedure: settings_get_print
Trace: view
Modified: Thu Nov 26 11:08:11 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     
ProblemLineSource
   /kat0/fletcher/SATE/2010/irssi-0.8.14/src/core/settings.c
   Enter settings_get_print
true151 char *settings_get_print(SETTINGS_REC *rec) 
 152 {
 153         char *value;
 154  
 155         switch(rec->type) {
 156         case SETTING_TYPE_BOOLEAN: 
 157                 value = g_strdup(settings_get_bool(rec->key) ? "ON" : "OFF");
 158                 break;
 159         case SETTING_TYPE_INT: 
 160                 value = g_strdup_printf("%d", settings_get_int(rec->key));
 161                 break;
 162         case SETTING_TYPE_STRING: 
 163         case SETTING_TYPE_TIME: 
 164         case SETTING_TYPE_LEVEL: 
 165         case SETTING_TYPE_SIZE: 
 166                 value = g_strdup(settings_get_str(rec->key));
 167                 break;
 168         }
value is uninitialized169         return value;     /* Uninitialized Variable */
Preconditions
rec->type != 0
rec->type != 1
rec->type != 2
rec->type != 3
rec->type != 4
rec->type != 5




Change Warning 4752.28228 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: