Fix compiler warning
qurlrecode.cpp:481:24: warning: ‘action’ may be used uninitialized in this function [-Wmaybe-uninitialized] Change-Id: I638b65218d1875667e2c60a5720ecda87202b82f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
f7b1262c7f
commit
5c2a055230
@ -483,6 +483,8 @@ static int recode(QString &result, const ushort *begin, const ushort *end, QUrl:
|
||||
// try a run where no change is necessary
|
||||
for ( ; input != end; ++input) {
|
||||
c = *input;
|
||||
if (c < 0x20U)
|
||||
action = EncodeCharacter;
|
||||
if (c < 0x20U || c >= 0x80U) // also: (c - 0x20 < 0x60U)
|
||||
goto non_trivial;
|
||||
action = EncodingAction(actionTable[c - ' ']);
|
||||
@ -534,9 +536,6 @@ non_trivial:
|
||||
}
|
||||
}
|
||||
|
||||
if (decoded < 0x20)
|
||||
action = EncodeCharacter;
|
||||
|
||||
// there are six possibilities:
|
||||
// current \ action | DecodeCharacter | LeaveCharacter | EncodeCharacter
|
||||
// decoded | 1:leave | 2:leave | 3:encode
|
||||
|
Loading…
Reference in New Issue
Block a user