Opened 7 years ago
Closed 7 years ago
#10277 closed defect (fixed)
TITANIC: Use of uninitialised variable
Reported by: | csnover | Owned by: | dreammaster |
---|---|---|---|
Priority: | normal | Component: | Engine: Titanic |
Version: | Keywords: | ||
Cc: | Game: | Starship Titanic |
Description
scummvm/engines/titanic/true_talk/tt_npc_script.cpp:313:10: warning: variable 'rangeLimit' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (dialRegion != 1) { ^~~~~~~~~~~~~~~ scummvm/engines/titanic/true_talk/tt_npc_script.cpp:320:63: note: uninitialized use occurs here dialogueId = ((remainder + _quotes._incr) % 100) >= (uint)rangeLimit ^~~~~~~~~~ scummvm/engines/titanic/true_talk/tt_npc_script.cpp:313:6: note: remove the 'if' if its condition is always true if (dialRegion != 1) { ^~~~~~~~~~~~~~~~~~~~~ scummvm/engines/titanic/true_talk/tt_npc_script.cpp:309:19: note: initialize the variable 'rangeLimit' to silence this warning int rangeLimit; ^ = 0
Change History (1)
comment:1 by , 7 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.