Closed Bug 329727 Opened 19 years ago Closed 19 years ago

Coverity doesn't like ReportError in jscntxt because it pretends reportp could be null

Categories

(Core :: JavaScript Engine, defect)

PowerPC
macOS
defect
Not set
trivial

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: timeless)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity)

Attachments

(1 obsolete file)

reportp *can't* be null, as ReportError is a static function and all callers are supposed to pass &report as reportp. But because we null check, coverity gets confused and complains.
Attached patch reduce noise (obsolete) — Splinter Review
Attachment #214400 - Flags: review?(shaver)
Comment on attachment 214400 [details] [diff] [review] reduce noise >Index: jscntxt.c > ReportError(JSContext *cx, const char *message, JSErrorReport *reportp) > { >+ JS_ASSERT(reportp); Nit: Move this... > /* > * Check the error report, and set a JavaScript-catchable exception > * if the error is defined to have an associated exception. If an > * exception is thrown, then the JSREPORT_EXCEPTION flag will be set > * on the error report, and exception-aware hosts should ignore it. > */ ...here so you don't have to add an additonal newline before the major comment. >- if (reportp && reportp->errorNumber == JSMSG_UNCAUGHT_EXCEPTION) >+ if (reportp->errorNumber == JSMSG_UNCAUGHT_EXCEPTION) r=mrbkap
Attachment #214400 - Flags: review?(shaver) → review+
Comment on attachment 214400 [details] [diff] [review] reduce noise mozilla/js/src/jscntxt.c 3.77
Attachment #214400 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Flags: in-testsuite-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: