mirror of
https://gitlab.freedesktop.org/uchardet/uchardet.git
synced 2025-12-06 16:56:40 +08:00
src: fix non-guarded 'if' warning.
Not sure if this is useful to have the 'if (mDetectedCharset)' outside
the if block, but it won't hurt for sure in this specific case, so I
leave the current code logics as is.
The exact warning was:
nsUniversalDetector.cpp: In member function ‘virtual nsresult nsUniversalDetector::HandleData(const char*, PRUint32)’:
nsUniversalDetector.cpp:115:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (aLen > 2)
^~
nsUniversalDetector.cpp:157:7: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
if (mDetectedCharset)
^~
This commit is contained in:
parent
26024e5c82
commit
183092d048
@ -113,6 +113,7 @@ nsresult nsUniversalDetector::HandleData(const char* aBuf, PRUint32 aLen)
|
||||
{
|
||||
mStart = PR_FALSE;
|
||||
if (aLen > 2)
|
||||
{
|
||||
switch (aBuf[0])
|
||||
{
|
||||
case '\xEF':
|
||||
@ -153,6 +154,7 @@ nsresult nsUniversalDetector::HandleData(const char* aBuf, PRUint32 aLen)
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (mDetectedCharset)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user