From: Wolfgang Rosenauer Subject: Fix compiler warnings which disturb autobuild References: ### autobuild ... testing for serious compiler warnings Program is using uninitialized variables. Note the difference between "is used" and "may be used". Please investigate and fix. Problematic file(s) and their linenumbers: nsUnicodeToJamoTTF.cpp: 855 nsObjectFrame.cpp: 1933 ### ### autobuild ... testing for serious compiler warnings Program returns random data in a function. Please fix. Problematic file(s) and their linenumbers: nsWebShell.cpp: 562 Program is using uninitialized variables. Note the difference between "is used" and "may be used". Please investigate and fix. Problematic file(s) and their linenumbers: nsFrame.cpp: 3536 ### Index: gfx/src/gtk/nsFontMetricsUtils.cpp =================================================================== --- gfx/src/gtk/nsFontMetricsUtils.cpp.orig +++ gfx/src/gtk/nsFontMetricsUtils.cpp @@ -75,6 +75,7 @@ NS_FontMetricsGetHints(void) #ifdef MOZ_ENABLE_COREXFONTS return nsFontMetricsGTK::GetHints(); #endif + return 1; } nsresult @@ -95,6 +96,7 @@ NS_FontMetricsFamilyExists(nsIDeviceCont #ifdef MOZ_ENABLE_COREXFONTS return nsFontMetricsGTK::FamilyExists(aDevice, aName); #endif + return 1; } #if defined(MOZ_ENABLE_XFT) && defined(MOZ_ENABLE_COREXFONTS) Index: intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp =================================================================== --- intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp.orig +++ intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp @@ -842,6 +842,7 @@ PRInt16 JamoSrchReplace (const JamoNormM { const JamoNormMap *match; JamoNormMap key; + key.liga = 0; // cluster array is made up of PRUint8's to save memory // and we have to subtract aOffset from the input before looking it up. Index: layout/generic/nsObjectFrame.cpp =================================================================== --- layout/generic/nsObjectFrame.cpp.orig +++ layout/generic/nsObjectFrame.cpp @@ -1846,6 +1846,7 @@ nsObjectFrame::Paint(nsPresContext* nsPoint origin; float t2p; window.window = nsnull; + window.ws_info = nsnull; // prepare embedded mode printing struct nsPluginPrint npprint; Index: docshell/base/nsWebShell.cpp =================================================================== --- docshell/base/nsWebShell.cpp.orig +++ docshell/base/nsWebShell.cpp @@ -557,6 +557,7 @@ nsWebShell::OnLinkClickSync(nsIContent * NS_ABORT_IF_FALSE(0,"unexpected link verb"); return NS_ERROR_UNEXPECTED; } + return NS_ERROR_UNEXPECTED; } NS_IMETHODIMP Index: layout/generic/nsFrame.cpp =================================================================== --- layout/generic/nsFrame.cpp.orig +++ layout/generic/nsFrame.cpp @@ -3569,7 +3569,7 @@ nsFrame::PeekOffsetParagraph(nsPresConte #ifdef DEBUG_paragraph printf("Selecting paragraph\n"); #endif - nsIFrame* blockFrame; + nsIFrame* blockFrame = NULL; nsCOMPtr iter (getter_AddRefs(GetBlockFrameAndLineIter(this, &blockFrame))); if (!blockFrame || !iter) return NS_ERROR_UNEXPECTED; Index: mailnews/local/src/nsMailboxService.cpp =================================================================== --- mailnews/local/src/nsMailboxService.cpp.orig +++ mailnews/local/src/nsMailboxService.cpp @@ -228,7 +228,7 @@ nsresult nsMailboxService::FetchMessage( // this happens with forward inline of message/rfc822 attachment // opened in a stand-alone msg window. - PRInt32 typeIndex = typeIndex = uriString.Find("&type=application/x-message-display"); + PRInt32 typeIndex = uriString.Find("&type=application/x-message-display"); if (typeIndex != kNotFound) { uriString.Cut(typeIndex, sizeof("&type=application/x-message-display") - 1);