gcc 4 build fixes for Camino. Patch by Mark Mentovai. b=297688 r=josh sr=smfr a=asa

This commit is contained in:
joshmoz%gmail.com 2005-06-15 16:39:40 +00:00
Родитель 155cff1303
Коммит 112632bd49
6 изменённых файлов: 15 добавлений и 12 удалений

Просмотреть файл

@ -896,7 +896,7 @@ static const int kDisabledQuicksearchPopupItemTag = 9999;
{
// need to be careful to adjust index as we insert items to avoid
// inserting in reverse order
if ([aKid parent] == dropFolder)
if ([aKid parent] == (id)dropFolder)
{
int kidIndex = [dropFolder indexOfObject:aKid];
[[aKid parent] moveChild:aKid toBookmarkFolder:dropFolder atIndex:index];

Просмотреть файл

@ -163,7 +163,7 @@
return cleanString;
}
- (NSString*)stringByTruncatingTo:(unsigned in)maxCharacters at:(ETruncationType)truncationType
- (NSString*)stringByTruncatingTo:(unsigned int)maxCharacters at:(ETruncationType)truncationType
{
if ([self length] > maxCharacters)
{

Просмотреть файл

@ -273,18 +273,18 @@ static inline u_int ns_get16(u_char* buffer)
u_int i;
for (i = 0; i < numQuestions; i++)
ptr = DNS_SkipQuestion((DNSMessage *)buffer, ptr, end);
ptr = (u_char *)DNS_SkipQuestion((DNSMessage *)buffer, ptr, end);
for (i = 0; i < numAnswers; i++)
{
domainname name;
ptr = DNS_GetDomainName((DNSMessage *)buffer, ptr, end, &name);
ptr = (u_char *)DNS_GetDomainName((DNSMessage *)buffer, ptr, end, &name);
if (!ptr || ptr + 10 > end) return;
rrtype = ns_get16(ptr);
rrclass = ns_get16(ptr + 2) & 0x7FFF;
// TTL is ptr+4,5,6,7
rdlen = ns_get16(ptr + 8);
void* rdata = ptr + 10;
u_char* rdata = ptr + 10;
ptr += 10 + rdlen;
if (rrtype == /* T_SRV */ 33 && rrclass == C_IN)

Просмотреть файл

@ -2517,7 +2517,7 @@ nsChildView::Idle()
RgnHandle updateRgn = ::NewRgn();
RectRgn(updateRgn, &updateRect);
::QDFlushPortBuffer([self qdPort], updateRgn);
::QDFlushPortBuffer((OpaqueGrafPtr *)[self qdPort], updateRgn);
::DisposeRgn(updateRgn);
}

Просмотреть файл

@ -46,6 +46,7 @@
{
@private
NSTimer *mTimer;
@protected
int mFrameCounter;
}

Просмотреть файл

@ -1299,9 +1299,10 @@ nsMenuX::AttributeChanged(nsIDocument *aDocument, PRInt32 aNameSpaceID, nsIAtom
PRUint32 indexToRemove = 0;
if ( NS_SUCCEEDED(CountVisibleBefore(&indexToRemove)) ) {
++indexToRemove; // if there are N siblings before me, my index is N+1
MenuRef menubar = nsnull;
menubarParent->GetNativeData ( (void*)menubar );
if ( menubar ) {
void *clientData = nsnull;
menubarParent->GetNativeData ( clientData );
if ( clientData ) {
MenuRef menubar = reinterpret_cast<MenuRef>(clientData);
::SetMenuItemHierarchicalMenu(menubar, indexToRemove, nsnull);
::DeleteMenuItem(menubar, indexToRemove);
mVisible = PR_FALSE;
@ -1321,9 +1322,10 @@ nsMenuX::AttributeChanged(nsIDocument *aDocument, PRInt32 aNameSpaceID, nsIAtom
if ( menubarParent ) {
PRUint32 insertAfter = 0;
if ( NS_SUCCEEDED(CountVisibleBefore(&insertAfter)) ) {
MenuRef menubar = nsnull;
menubarParent->GetNativeData ( (void*)menubar );
if ( menubar ) {
void *clientData = nsnull;
menubarParent->GetNativeData ( clientData );
if ( clientData ) {
MenuRef menubar = reinterpret_cast<MenuRef>(clientData);
// Shove this menu into its rightful place in the menubar. It doesn't matter
// what title we pass to InsertMenuItem() because when we stuff the actual menu
// handle in, the correct title goes with it.