Closed Bug 448431 Opened 16 years ago Closed 16 years ago

PK11_CreateMergeLog() declaration causes gcc warning when compiling with -Wstrict-prototypes

Categories

(NSS :: Libraries, defect, P4)

3.12
defect

Tracking

(Not tracked)

RESOLVED FIXED
3.12.2

People

(Reporter: mozilla, Unassigned)

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.16) Gecko/20080715 Fedora/2.0.0.16-1.fc8 Firefox/2.0.0.16
Build Identifier: CVS head

When compiling a program that includes using NSS under gcc4 (gcc (GCC) 4.1.2 20070925 (Red Hat 4.1.2-33)) with:

gcc -Wstrict-prototypes -I /usr/include/nss3 -I /usr/include/nspr4 -o test test.c

I get the following warning:

/usr/include/nss3/pk11pub.h:249: warning: function declaration isn’t a prototype

The attached patch clears up the warning.

Reproducible: Always

Steps to Reproduce:
1. Compile the attached trivial program with gcc4 (I didn't check other versions of gcc to see if they behave differently):

gcc -Wstrict-prototypes -I /usr/include/nss3 -I /usr/include/nspr4 -o test test.c
Actual Results:  
[user@host NSS]$ gcc -Wstrict-prototypes -I /usr/include/nss3 -I /usr/include/nspr4 -o test test.c
In file included from test.c:1:
/usr/include/nss3/pk11pub.h:249: warning: function declaration isn’t a prototype
[user@host NSS]$

Expected Results:  
No warning
Severity: normal → trivial
Priority: -- → P4
Attachment #331644 - Attachment mime type: text/x-csrc → text/plain
Comment on attachment 331645 [details] [diff] [review]
add void to declaration and definition

r=wtc.
Attachment #331645 - Flags: review+
Thanks for the patch.  I checked it in on the NSS trunk (NSS 3.12.2).

Checking in pk11merge.c;
/cvsroot/mozilla/security/nss/lib/pk11wrap/pk11merge.c,v  <--  pk11merge.c
new revision: 1.2; previous revision: 1.1
done
Checking in pk11pub.h;
/cvsroot/mozilla/security/nss/lib/pk11wrap/pk11pub.h,v  <--  pk11pub.h
new revision: 1.27; previous revision: 1.26
done
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
OS: Linux → All
Hardware: PC → All
Resolution: --- → FIXED
Target Milestone: --- → 3.12.2
Version: unspecified → 3.12
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: