Closed Bug 1299234 Opened 8 years ago Closed 8 years ago

Fix incorrect if statement block in AppendDistroSearchDirs()

Categories

(Firefox :: Distributions, defect)

Unspecified
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 51
Tracking Status
firefox51 --- fixed

People

(Reporter: Cykesiopka, Assigned: Cykesiopka)

References

()

Details

Attachments

(1 file)

When compiling m-c with GCC 6, this warning is emitted: > /moz/mozilla-inbound/browser/components/dirprovider/DirectoryProvider.cpp: In function ‘void mozilla::browser::AppendDistroSearchDirs(nsIProperties*, nsCOMArray<nsIFile>&)’: > 0:20.05 /moz/mozilla-inbound/browser/components/dirprovider/DirectoryProvider.cpp:120:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation] > 0:20.05 if (NS_SUCCEEDED(rv) && exists) > 0:20.05 ^~ > 0:20.05 /moz/mozilla-inbound/browser/components/dirprovider/DirectoryProvider.cpp:122:11: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ > 0:20.05 return; // all done > 0:20.05 ^~~~~~ This breaks the build for anyone using GCC6 and --enable-warnings-as-errors, but more importantly, it seems to point to a bug. From my inspection of the code, it looks like the return should be within the block of the if statement, but this is not the case due to the lack of braces.
Comment on attachment 8786430 [details] Bug 1299234 - Fix incorrect if statement block in AppendDistroSearchDirs(). https://reviewboard.mozilla.org/r/75368/#review73230
Attachment #8786430 - Flags: review?(mozilla) → review+
Keywords: checkin-needed
Summary: Fix incorrect if statement block in AppendDistroSearchDirs(). → Fix incorrect if statement block in AppendDistroSearchDirs()
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/fx-team/rev/51afefd5f63d Fix incorrect if statement block in AppendDistroSearchDirs(). r=mkaply
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 51
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: