Closed
Bug 307
Opened 27 years ago
Closed 26 years ago
another explicit cast in edtutil.cpp
Categories
(MozillaClassic Graveyard :: Composer, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: berkley, Assigned: cmanske)
Details
Created by Berkley Shands (berkley@cs.wustl.edu) on Wednesday, May 6, 1998 9:36:57 AM PDT
Additional Details :
cxx: Warning: edtutil.cpp, line 4902: variable "iHeight" is
used before its value is set
iHeight = (iHeight * 100) / m_iViewHeight;
-----------------------^
cxx: Error: edtutil.cpp, line 5380: no instance of
overloaded function "CEditLinkManager::AdjustLink" matches
the argument list
argument types are: (ED_LinkId, char *, long,
long)
pEditBuffer->linkManager.AdjustLink(linkId,
pBaseURL, NULL, NULL);
-------------------------------------^
fix is
pEditBuffer->linkManager.AdjustLink(linkId,
pBaseURL,
(char*) NULL, (ED_HREFList *) NULL);
berkley
Updated•27 years ago
|
Assignee: brade → cmanske
Comment 1•27 years ago
|
||
reassign to cmanske@netscape.com
Assignee | ||
Updated•27 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•27 years ago
|
||
Casting a NULL seems ludicrous. Does it work if you use zero (0 or 0L) instead?
I also don't get the warning. Here is the code from the first assignment of
iHeight to the line with the warning:
int32 iHeight = m_Rect.bottom - m_Rect.top;
int32 iPercent;
XP_Bool bDoWidth = (m_iStyle & ED_SIZE_LEFT) || (m_iStyle &
ED_SIZE_RIGHT);
XP_Bool bDoHeight = (m_iStyle & ED_SIZE_TOP) || (m_iStyle &
ED_SIZE_BOTTOM);
// Show only dimension(s) for whats changing: (Width vs. Height vs both)
// First part of status shows: "Width = xx[pixesl|%of window width]"
// and/or similar string for Height.
//
if( bDoWidth )
{
iPercent = (iWidth * 100 ) / m_iStartWidth;
if(m_bWidthPercent)
{
// Convert to % format
iWidth = (iWidth * 100) / m_iParentWidth;
}
// "Width = x"
PR_snprintf(pMsg, 128, XP_GetString(XP_EDT_WIDTH_EQUALS), iWidth);
// "pixels" or "% of window"
strcat(pMsg, XP_GetString(m_iWidthMsgID));
// The % of original [width] and/or [height] string
// Current logic assumes constaining aspect ratio when sizing
corners,
// so separate Width, Height percentages are not shown
XP_STRCPY(pPercentOfWhat, XP_GetString(XP_EDT_WIDTH));
}
if( bDoHeight )
{
// Since corners are constrained to aspect ratio,
// just use Width's calculation if already done
if( !bDoWidth )
{
iPercent = (iHeight * 100 ) / m_iStartHeight;
}
if(m_bHeightPercent)
{
iHeight = (iHeight * 100) / m_iViewHeight;
}
Assignee | ||
Updated•26 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 3•26 years ago
|
||
Checked in 10/29/98
You need to log in
before you can comment on or make changes to this bug.
Description
•