Closed Bug 445951 Opened 17 years ago Closed 17 years ago

missing keyword 'public' in xpcom/glue/nsAutoLock.h

Categories

(Core :: XPCOM, defect)

Other
AIX
defect
Not set
trivial

Tracking

()

RESOLVED FIXED

People

(Reporter: ul-mcamafia, Assigned: ul-mcamafia)

Details

(Keywords: platform)

Attachments

(1 file, 2 obsolete files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.8.1.16) Gecko/20080702 SeaMonkey/1.1.11 Build Identifier: cvs tag FIREFOX_3_0_1_RELEASE in the declaration class nsAutoUnlock : nsAutoUnlockBase {} the VACPP 6 compiler correctly assumes 'private' for the ommitted keyword. An explicit 'public' is needed. Reproducible: Always Steps to Reproduce: 1. Compile on AIX 5 with VACPP6 2. 3. Actual Results: build breaks Expected Results: compile without severe warnings Suggest trivial patch: Index: mozilla/xpcom/glue/nsAutoLock.h =================================================================== RCS file: /cvsroot/mozilla/xpcom/glue/nsAutoLock.h,v retrieving revision 1.2 diff -u -8 -p -r1.2 nsAutoLock.h --- mozilla/xpcom/glue/nsAutoLock.h 16 Aug 2007 20:51:50 -0000 1.2 +++ mozilla/xpcom/glue/nsAutoLock.h 18 Jul 2008 07:20:48 -0000 @@ -245,17 +245,17 @@ public: void unlock() { PR_ASSERT(mLocked); PR_Unlock(mLock); mLocked = PR_FALSE; Hide(); } }; -class nsAutoUnlock : nsAutoUnlockBase +class nsAutoUnlock : public nsAutoUnlockBase { private: PRLock *mLock; public: nsAutoUnlock(PRLock *lock) : nsAutoUnlockBase(lock), mLock(lock)
build environment produces working Firefox 2.0.0.16 and Seamonkey 1.1.11
Version: unspecified → 1.9.0 Branch
Here is the snip from the build log: "../../dist/include/xpcom/nsAutoLock.h", line 253.22: 1540-0198 (W) The omitted keyword "private" is assumed for base class "nsAutoUnlockBase". "/home/ulink/Src/mozilla/xpcom/threads/nsTimerImpl.cpp", line 461.3: 1540-0300 (S) The "private" member "nsTimerEvent::~nsTimerEvent()" cannot be accessed. "../../dist/include/xpcom/nsCOMPtr.h", line 187.7: 1540-0719 (I) The previous message was produced while processing the implicit member function "nsDerivedSafe<nsTimerEvent>::~nsDerivedSafe()". "../../dist/include/xpcom/nsCOMPtr.h", line 187.7: 1540-0700 (I) The previous message was produced while processing "class nsDerivedSafe<nsTimerEvent>". "/home/ulink/Src/mozilla/xpcom/threads/nsTimerImpl.cpp", line 495.10: 1540-0700 (I) The previous message was produced while processing "nsTimerImpl::PostTimerEvent()". gmake[5]: *** [nsTimerImpl.o] Error 1
OS: All → AIX
Hardware: All → Other
You need to attach the patch and request review on it from an appropriate reviewer before it can be checked in
Keywords: checkin-needed
Attached patch suggested patch (obsolete) — Splinter Review
Attachment #331295 - Flags: review?
Attachment #331295 - Flags: approval1.9.0.2?
Comment on attachment 331295 [details] [diff] [review] suggested patch You must request review from specific people, and patches are not considered for branches until after they have been reviewed and checked into trunk for a while. You may want to skim over http://www.mozilla.org/hacking/
Attachment #331295 - Flags: review?(benjamin)
Attachment #331295 - Flags: review?
Attachment #331295 - Flags: approval1.9.0.2?
Why does this need to be public? Or are you just trying to silence what appears to be warning? Can't you use "private" instead?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #331295 - Attachment is obsolete: true
Attachment #331295 - Flags: review?(benjamin)
Attached patch suggested patch (obsolete) — Splinter Review
trivial patch, issue is cosmetic only. replacing the implicit "private" with explicit keyword "private" The compilation error in nsTimerImpl() as shown in the posted build log snip isn't related.
Attachment #331467 - Flags: review?
Attachment #331467 - Flags: review? → review?(benjamin)
Severity: normal → trivial
Same cosmetic issue also in: nsUnicharInputStream.h for base class nsISimpleUnicharStreamFactory nsFastLoadFile.h for base class nsFastLoadFileIO nsCategoryManager.cpp for base class nsIUTF8StringEnumerator will create a combined patch proposal today and attach to this bug report.
Attachment #331467 - Attachment is obsolete: true
Attachment #331467 - Flags: review?(benjamin)
Attachment #331490 - Flags: review?(benjamin) → review+
Keywords: checkin-needed
Attachment #331490 - Flags: superreview?(shaver)
Comment on attachment 331490 [details] [diff] [review] patch makes implicite private inheritance explicat to suppress useless warnings no sr needed
Attachment #331490 - Flags: superreview?(shaver)
Assignee: nobody → ul.mcamafia
Status: NEW → ASSIGNED
Is this patch for checkin on trunk or on branch (just wondering because of the Version field in this bug)?
trunk-only. There is no need to take this warning-only fix on the branch.
Version: 1.9.0 Branch → Trunk
pushed to mozilla-central, changeset 2f7064a38261.
Keywords: checkin-needed
Depends on: 451138
No longer depends on: 451138
Status: ASSIGNED → RESOLVED
Closed: 17 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: