Ticket #9120: sci_uninitialized_variable_warnings.patch
File sci_uninitialized_variable_warnings.patch, 2.2 KB (added by , 15 years ago) |
---|
-
engines/sci/gui/gui_text.cpp
355 355 356 356 // Draws a text in rect. 357 357 void SciGuiText::Box(const char *text, int16 bshow, const Common::Rect &rect, GuiTextAlignment alignment, GuiResourceId fontId) { 358 int16 textWidth, textHeight, charCount, offset; 358 int16 textWidth, textHeight, charCount; 359 int16 offset = 0; 359 360 int16 hline = 0; 360 361 GuiResourceId orgFontId = GetFontId(); 361 362 int16 orgPenColor = _gfx->_curPort->penClr; … … 380 381 offset = (rect.width() - textWidth) / 2; 381 382 break; 382 383 case SCI_TEXT_ALIGNMENT_LEFT: 383 offset = 0;384 // Nothing to do 384 385 break; 385 386 386 387 default: // left-aligned -
engines/sci/resource.cpp
955 955 956 956 Common::String mask, name; 957 957 Common::ArchiveMemberList files; 958 int number ;958 int number = -1; 959 959 const char *szResType; 960 960 ResourceSource *psrcPatch; 961 bool bAdd;962 961 963 962 for (int i = kResourceTypeView; i < kResourceTypeAudio36; i ++) { 964 963 files.clear(); … … 972 971 mask += resourceTypeSuffixes[i]; 973 972 SearchMan.listMatchingMembers(files, mask); 974 973 for (Common::ArchiveMemberList::const_iterator x = files.begin(); x != files.end(); x++) { 975 bAdd = false;976 974 name = (*x)->getName(); 977 975 // SCI1 scheme 978 976 if (isdigit(name[0])) { 979 977 number = atoi(name.c_str()); 980 bAdd = true;981 978 } else { 982 979 // SCI0 scheme 983 980 int resname_len = strlen(szResType); 984 981 if (scumm_strnicmp(name.c_str(), szResType, resname_len) == 0 985 982 && !isalpha(name[resname_len + 1])) { 986 983 number = atoi(name.c_str() + resname_len + 1); 987 bAdd = true;988 984 } 989 985 } 990 986 991 if (bAdd) { 992 psrcPatch = new ResourceSource; 993 psrcPatch->source_type = kSourcePatch; 994 psrcPatch->location_name = name; 995 processPatch(psrcPatch, (ResourceType)i, number); 996 } 987 psrcPatch = new ResourceSource; 988 psrcPatch->source_type = kSourcePatch; 989 psrcPatch->location_name = name; 990 processPatch(psrcPatch, (ResourceType)i, number); 997 991 } 998 992 } 999 993 }