File abuild.patch of Package kompozer

From fc0aca6d95704d57d2a09750a8ffb364dfda00c4 Mon Sep 17 00:00:00 2001
From: Michael Wolf <maw@novell.com>
Date: Thu, 13 Nov 2008 12:48:08 -0600
Subject: [PATCH] abuild.patch



From: Wolfgang Rosenauer <stark@suse.de>
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:
  certificate.c: 541
  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
  nsOperaProfileMigrator.cpp: 831
  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
###

### autobuild
... testing for serious compiler warnings
    (using /usr/lib/build/checks-data/check_gcc_output)
    (using /abuild/maw-sles10/.build.log)
ERROR: Program returns random data in a function. Please fix.
Problematic file(s) and their linenumbers:
  ns4xPlugin.cpp: 2247
###
---
 mozilla/docshell/base/nsWebShell.cpp            |    1 +
 mozilla/gfx/src/gtk/nsFontMetricsUtils.cpp      |    2 ++
 mozilla/intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp |    1 +
 mozilla/layout/generic/nsFrame.cpp              |    2 +-
 mozilla/layout/generic/nsObjectFrame.cpp        |    1 +
 mozilla/modules/plugin/base/src/ns4xPlugin.cpp  |    3 +++
 6 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp
index d49e2a4..8dee938 100644
--- a/mozilla/docshell/base/nsWebShell.cpp
+++ b/mozilla/docshell/base/nsWebShell.cpp
@@ -565,6 +565,7 @@ nsWebShell::OnLinkClickSync(nsIContent *aContent,
       NS_ABORT_IF_FALSE(0,"unexpected link verb");
       return NS_ERROR_UNEXPECTED;
   }
+  return NS_ERROR_UNEXPECTED;
 }
 
 NS_IMETHODIMP
diff --git a/mozilla/gfx/src/gtk/nsFontMetricsUtils.cpp b/mozilla/gfx/src/gtk/nsFontMetricsUtils.cpp
index 2bcd769..4ffef6a 100644
--- a/mozilla/gfx/src/gtk/nsFontMetricsUtils.cpp
+++ b/mozilla/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(nsIDeviceContext *aDevice, const nsString &aName)
 #ifdef MOZ_ENABLE_COREXFONTS
     return nsFontMetricsGTK::FamilyExists(aDevice, aName);
 #endif
+    return 1;
 }
 
 #if defined(MOZ_ENABLE_XFT) && defined(MOZ_ENABLE_COREXFONTS)
diff --git a/mozilla/intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp b/mozilla/intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp
index a9960b2..0879f41 100644
--- a/mozilla/intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp
+++ b/mozilla/intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp
@@ -842,6 +842,7 @@ PRInt16 JamoSrchReplace (const JamoNormMap* aClusters,
   {
     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.
diff --git a/mozilla/layout/generic/nsFrame.cpp b/mozilla/layout/generic/nsFrame.cpp
index ac067b3..8a80f9d 100644
--- a/mozilla/layout/generic/nsFrame.cpp
+++ b/mozilla/layout/generic/nsFrame.cpp
@@ -3576,7 +3576,7 @@ nsFrame::PeekOffsetParagraph(nsPresContext* aPresContext,
 #ifdef DEBUG_paragraph
   printf("Selecting paragraph\n");
 #endif
-  nsIFrame* blockFrame;
+  nsIFrame* blockFrame = NULL;
   nsCOMPtr<nsILineIterator> iter (getter_AddRefs(GetBlockFrameAndLineIter(this, &blockFrame)));
   if (!blockFrame || !iter)
     return NS_ERROR_UNEXPECTED;
diff --git a/mozilla/layout/generic/nsObjectFrame.cpp b/mozilla/layout/generic/nsObjectFrame.cpp
index 3cc5680..e145fc0 100644
--- a/mozilla/layout/generic/nsObjectFrame.cpp
+++ b/mozilla/layout/generic/nsObjectFrame.cpp
@@ -1848,6 +1848,7 @@ nsObjectFrame::Paint(nsPresContext*       aPresContext,
     nsPoint           origin;
     float             t2p;
     window.window =   nsnull;
+    window.ws_info =  nsnull;
 
     // prepare embedded mode printing struct
     nsPluginPrint npprint;
diff --git a/mozilla/modules/plugin/base/src/ns4xPlugin.cpp b/mozilla/modules/plugin/base/src/ns4xPlugin.cpp
index 9d427da..4bd5512 100644
--- a/mozilla/modules/plugin/base/src/ns4xPlugin.cpp
+++ b/mozilla/modules/plugin/base/src/ns4xPlugin.cpp
@@ -2244,6 +2244,9 @@ _setvalue(NPP npp, NPPVariable variable, void *result)
     default:
       return NPERR_NO_ERROR;
   }
+  /* to make gcc happy: */
+  return NPERR_NO_ERROR;
+
 }
 
 ////////////////////////////////////////////////////////////////////////
openSUSE Build Service is sponsored by