зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1356843 - Fix -Wcomma warnings in xpcom/io/nsLocalFileUnix.cpp. r=froydnj
clang's -Wcomma warning warns about suspicious use of the comma operator such as calling a function for side effects within an expression. Check NS_SUCCEEDED() to use HasMoreElement() in an expression and confirm that it actually returned a legitimate out parameter. xpcom/io/nsLocalFileUnix.cpp:725:48 [-Wcomma] possible misuse of comma operator here xpcom/io/nsLocalFileUnix.cpp:1053:39 [-Wcomma] possible misuse of comma operator here MozReview-Commit-ID: aebrgc5Wqk --HG-- extra : rebase_source : 18a2bbeb55ff106cdcb88e4889c7fd2745952a31 extra : source : e62ac5b8744d342948ab12f21f369d21f857a706
This commit is contained in:
Родитель
9149c50f65
Коммит
30c0c4add0
|
@ -722,7 +722,7 @@ nsLocalFile::CopyDirectoryTo(nsIFile* aNewParent)
|
|||
}
|
||||
|
||||
bool hasMore = false;
|
||||
while (dirIterator->HasMoreElements(&hasMore), hasMore) {
|
||||
while (NS_SUCCEEDED(dirIterator->HasMoreElements(&hasMore)) && hasMore) {
|
||||
nsCOMPtr<nsISupports> supports;
|
||||
nsCOMPtr<nsIFile> entry;
|
||||
rv = dirIterator->GetNext(getter_AddRefs(supports));
|
||||
|
@ -1050,7 +1050,7 @@ nsLocalFile::Remove(bool aRecursive)
|
|||
}
|
||||
|
||||
bool more;
|
||||
while (dir->HasMoreElements(&more), more) {
|
||||
while (NS_SUCCEEDED(dir->HasMoreElements(&more)) && more) {
|
||||
nsCOMPtr<nsISupports> item;
|
||||
rv = dir->GetNext(getter_AddRefs(item));
|
||||
if (NS_FAILED(rv)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче