From 633be93e556a5a260c0836fa0bdb920e4811e2f8 Mon Sep 17 00:00:00 2001 From: "ramiro%netscape.com" Date: Sat, 5 Dec 1998 11:54:00 +0000 Subject: [PATCH] This patch set just makes sure that all functions that are supposed to return values actually do so, to keep the Solaris native compiler happy. Thanks to Tim Rowley for the fix. --- widget/src/gtk/nsGtkEventHandler.cpp | 3 +++ widget/src/gtk/nsScrollbar.cpp | 1 + widget/src/gtk/nsWidget.cpp | 1 + widget/src/gtk/nsWidget.h | 2 +- widget/src/gtk/nsWindow.cpp | 1 + 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/widget/src/gtk/nsGtkEventHandler.cpp b/widget/src/gtk/nsGtkEventHandler.cpp index 41b832e118b..b2e060a4d00 100644 --- a/widget/src/gtk/nsGtkEventHandler.cpp +++ b/widget/src/gtk/nsGtkEventHandler.cpp @@ -456,6 +456,7 @@ gint nsGtkWidget_Scrollbar_Callback(GtkWidget *w, gpointer p) sevent.message = NS_SCROLLBAR_POS; sevent.widget = (nsWidget *) p; widget->OnScroll(sevent, GTK_ADJUSTMENT(w)->value); + return 0; /* XXX */ } @@ -478,6 +479,7 @@ gint nsGtkWidget_Expose_Callback(GtkWidget *w, gpointer p) pevent.rect = (nsRect *)▭ widgetWindow->OnPaint(pevent); #endif + return 0; /* XXX */ } //============================================================== @@ -522,6 +524,7 @@ gint nsGtkWidget_Text_Callback(GtkWidget *w, GdkEvent* event, gpointer p) for (len = 0; len < cbs->text->length; len++) cbs->text->ptr[len] = '*'; #endif + return 0; /* XXX */ } //============================================================== diff --git a/widget/src/gtk/nsScrollbar.cpp b/widget/src/gtk/nsScrollbar.cpp index b7873e8a958..f0877f99e5d 100644 --- a/widget/src/gtk/nsScrollbar.cpp +++ b/widget/src/gtk/nsScrollbar.cpp @@ -265,6 +265,7 @@ int nsScrollbar::AdjustScrollBarPosition(int aPosition) int cap = maxRange - sliderSize; return aPosition > cap ? cap : aPosition; #endif + return 0; /* XXX */ } //------------------------------------------------------------------------- diff --git a/widget/src/gtk/nsWidget.cpp b/widget/src/gtk/nsWidget.cpp index 2c96be43f11..945d5aa3b23 100644 --- a/widget/src/gtk/nsWidget.cpp +++ b/widget/src/gtk/nsWidget.cpp @@ -73,6 +73,7 @@ NS_METHOD nsWidget::ScreenToWidget(const nsRect& aOldRect, nsRect& aNewRect) NS_IMETHODIMP nsWidget::Destroy(void) { ::gtk_widget_destroy(mWidget); + return NS_OK; } //------------------------------------------------------------------------- diff --git a/widget/src/gtk/nsWidget.h b/widget/src/gtk/nsWidget.h index 8adb61fc864..a152f27e990 100644 --- a/widget/src/gtk/nsWidget.h +++ b/widget/src/gtk/nsWidget.h @@ -120,7 +120,7 @@ class nsWidget : public nsBaseWidget virtual void InitCallbacks(char * aName = nsnull); void CreateGC(); - NS_IMETHOD CreateNative(GtkWidget *parentWindow) {}; + NS_IMETHOD CreateNative(GtkWidget *parentWindow) { return NS_OK; } nsresult StandardWindowCreate(nsIWidget *aParent, const nsRect &aRect, diff --git a/widget/src/gtk/nsWindow.cpp b/widget/src/gtk/nsWindow.cpp index 032d5c5ef2a..09300be90ca 100644 --- a/widget/src/gtk/nsWindow.cpp +++ b/widget/src/gtk/nsWindow.cpp @@ -226,6 +226,7 @@ NS_METHOD nsWindow::CreateNative(GtkWidget *parentWidget) gtk_widget_set_name(mWidget, "nsWindow"); mCursor = eCursor_select; SetCursor(eCursor_standard); + return NS_OK; }