Closed Bug 777191 Opened 13 years ago Closed 13 years ago

Fix warning about uninitialized variable in DefineIDBInterfaceConstants()

Categories

(Core :: Storage: IndexedDB, defect)

ARM
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17
Tracking Status
firefox14 --- affected
firefox15 --- affected
firefox16 --- affected
firefox17 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

Details

Attachments

(1 file)

mozilla/central/dom/base/nsDOMClassInfo.cpp: In function 'nsresult DefineIDBInterfaceConstants(JSContext*, JSObject*, const nsIID*)': mozilla/central/dom/base/nsDOMClassInfo.cpp:6013: warning: 'interface' may be used uninitialized in this function
Attachment #645610 - Flags: review?(jonas)
Does that actually fix the warning? Is GCC smart enough to realize that MOZ_NOT_REACHED doesn't return? What about in opt builds?
This patch fixes the warning for my local --enable-optimize build. MOZ_NOT_REACHED is not a nop in opt builds. It calls __builtin_unreachable() or abort(), depending on your compiler.
Status: NEW → ASSIGNED
Ah, it's different than NS_NOTREACHED then. /me grumbles about having all these different things.
Comment on attachment 645610 [details] [diff] [review] fix-uninitialized-interface-warning.patch Review of attachment 645610 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/base/nsDOMClassInfo.cpp @@ +6005,5 @@ > interface = IDBConstant::IDBRequest; > } > else if (aIID->Equals(NS_GET_IID(nsIIDBTransaction))) { > interface = IDBConstant::IDBTransaction; > + } else { } else {
Attachment #645610 - Flags: review?(jonas) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: