The default bug view has changed. See this FAQ.

Extra semicolon in SeqDatabase makes static analysis tool suspicious

RESOLVED FIXED in 3.12.1

Status

NSS
Libraries
--
trivial
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: Jesse Ruderman, Assigned: Jesse Ruderman)

Tracking

(Blocks: 1 bug)

unspecified
3.12.1

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
Created attachment 328234 [details] [diff] [review]
patch

From the reporter of bug 440771:

dbm/tests/lots.c:211

        while(!(status = (database->seq) (database, &key, &data, R_NEXT)));
			; /* null body */

Removing the semicolon from the first line won't change the compiled code, since the body of the while loop is empty anyway.  So I don't think I need code review.

Which repository do mozilla/dbm patches go into?  mozilla-central?
(Assignee)

Updated

9 years ago
Status: NEW → ASSIGNED

Comment 1

9 years ago
(In reply to comment #0)
>         while(!(status = (database->seq) (database, &key, &data, R_NEXT)));
>                         ; /* null body */
This might be more readable as a do loop:
do {
  status = (database->seq) (database, &key, &data, R_NEXT);
} while (!status);

Comment 2

9 years ago
Comment on attachment 328234 [details] [diff] [review]
patch

r=wtc.  The master source of mozilla/dbm is in the CVS repository.
It is now maintained by the NSS team.
Attachment #328234 - Flags: review+
(Assignee)

Comment 3

9 years ago
Thanks, wtc.  Can you check it in for me or CC someone who can?

Comment 4

9 years ago
I checked in your patch on the NSS trunk for NSS 3.12.1.

Checking in lots.c;
/cvsroot/mozilla/dbm/tests/lots.c,v  <--  lots.c
new revision: 3.15; previous revision: 3.14
done

Please don't check in this patch in mozilla-central.  We
want to keep the copy of NSS in mozilla-central identical
to snapshots provided by the NSS team.
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Component: Testing → Libraries
Product: Core → NSS
Resolution: --- → FIXED
Target Milestone: --- → 3.12.1
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.