Closed Bug 204407 Opened 22 years ago Closed 21 years ago

cleanup warnings in nsToolkit.cpp and nsLookAndFeel.cpp

Categories

(Core Graveyard :: GFX: BeOS, defect)

x86
BeOS
defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: timeless, Assigned: timeless)

References

Details

Attachments

(2 files, 1 obsolete file)

/swap/BEOS/mozilla/widget/src/beos/nsLookAndFeel.cpp:66: warning: unused variable `int idx'
/swap/BEOS/mozilla/widget/src/beos/nsToolkit.cpp:112: warning: long unsigned int format, pointer arg (arg 3)
/swap/BEOS/mozilla/widget/src/beos/nsToolkit.cpp:113: warning: long unsigned int format, pointer arg (arg 3)
/swap/BEOS/mozilla/widget/src/beos/nsToolkit.cpp:261: warning: long unsigned int format, pointer arg (arg 3)
/swap/BEOS/mozilla/widget/src/beos/nsToolkit.cpp:262: warning: long unsigned int format, pointer arg (arg 3)
Attached patch fix warnings (obsolete) — Splinter Review
Attachment #122451 - Flags: review?(sergei_d)
Comment on attachment 122451 [details] [diff] [review]
fix warnings

r = sergei_d@fi.tartu.ee
Attachment #122451 - Flags: review?(sergei_d) → review+
checked in
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Timeless, did you really test latest sources?
Those changes in nsToolkit.cpp, inspite those seemed safe, broke mozilla here -
no paint at start, only window frame after start with desktop garbage.

When i return to initial version of nsToolkit, all is working again
difference in strings is:

initial variant
lx event8003f318
lx sync8003f318

as you see - no 0x prefix here

Timeless version
p event0x8003f318
p sync0x8003f318 

leading "0x" prefix here.

So this must be urgently fixed, here, or there, were those semname and portname
are consumed!
beos/nsAppShell.cpp still uses long hex format:
  PR_snprintf(portname, sizeof(portname), "event%lx",
              (long unsigned) PR_GetCurrentThread());
  PR_snprintf(semname, sizeof(semname), "sync%lx",
              (long unsigned) PR_GetCurrentThread());
Also

portname:
/xpcom/threads/plevent.c, line 888 -- sprintf(portname, "event%lx",
self->handlerThread);

semname
/xpcom/threads/plevent.c, line 889 -- sprintf(semname, "sync%lx",
self->handlerThread);
Fixing problem with broken paint, removing similar warning in pleven, swapping
sprintf to RP_snprintf
Attachment #122451 - Attachment is obsolete: true
reopening
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #125641 - Flags: superreview?(bzbarsky)
Attachment #125641 - Flags: review+
Attachment #125641 - Flags: superreview?(bzbarsky) → superreview+
*** Bug 209437 has been marked as a duplicate of this bug. ***
I'm glad to see that this is being worked on. Now, how about changing the
summary to make it more comprehensible to mortals? ...something like "BeOS build
hangs/freezes when launched" should do.

Thanks,

Prog.
Summary of THIS bug?
No.
It was side-effect of first fix which looked absolutely innocent.

This bug is just about what it is - part of big timeless's work about cleaning
all possible warnings in whole Mozilla code.

(though, i'm still unsure that if most of them must be "OS BeOS" bugs, instaed
All or Other)
(checked in)

I file them based on the system i use at the time when i see the warning. I
happened to build on beos for a while so i filed a bunch on beos. there will
probably be runs of solaris and windows and linux at other points. (could be
os/2 and qnx too.) for xp warnings you can change them to all/all if you really
care...
Status: REOPENED → RESOLVED
Closed: 21 years ago21 years ago
Resolution: --- → FIXED
This is not fixed, patch to follow.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Ok, Sergei, you missed a spot with your last patch.  This should fix it.  It at
least does on my box.  Now, could someone REALLY review this please?  I.e.,
test this, before giving a r+!!!  

If, however, I don't get a response within a day or so, I will check it in to
the repo, as this has fixed my broken build on my box.
Attachment #126261 - Flags: review?(cls)
Comment on attachment 126261 [details] [diff] [review]
really fix this thing this time

r=cls
Attachment #126261 - Flags: review?(cls) → review+
Blocks: 209437
I just used the new patch from comment 15, and re-compiled. It works.
Checked in by timeless
Status: REOPENED → RESOLVED
Closed: 21 years ago21 years ago
Resolution: --- → FIXED
btw, sfrom strict POV, 64 is incorrect number for port-name size limit.
according to BeBook :"The name shouldn't exceed B_OS_NAME_LENGTH (32) characters."
Though, i don't see any danger currently, hardly %lx format may generate
something longer.
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: