From ca29fe0117fac8893a05ec5e495ac1a43b4c68cd Mon Sep 17 00:00:00 2001 From: Wim van der Meer Date: Sun, 27 Jun 2010 10:17:50 +0000 Subject: [PATCH] Compiler warning fixes. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37277 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/glteapot/ObjectView.cpp | 3 ++- src/apps/glteapot/ObjectView.h | 4 ++-- src/apps/glteapot/TeapotWindow.cpp | 6 ++++-- src/apps/glteapot/TeapotWindow.h | 13 +++++++++---- src/apps/glteapot/error.cpp | 2 +- src/apps/glteapot/error.h | 2 +- 6 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/apps/glteapot/ObjectView.cpp b/src/apps/glteapot/ObjectView.cpp index 391cd11c42..03316d526a 100644 --- a/src/apps/glteapot/ObjectView.cpp +++ b/src/apps/glteapot/ObjectView.cpp @@ -127,7 +127,8 @@ simonThread(void* cookie) } -ObjectView::ObjectView(BRect rect, char *name, ulong resizingMode, ulong options) +ObjectView::ObjectView(BRect rect, const char *name, ulong resizingMode, + ulong options) : BGLView(rect, name, resizingMode, 0, options), fHistEntries(0), fOldestEntry(0), diff --git a/src/apps/glteapot/ObjectView.h b/src/apps/glteapot/ObjectView.h index 8f515da644..3c108a5121 100644 --- a/src/apps/glteapot/ObjectView.h +++ b/src/apps/glteapot/ObjectView.h @@ -53,8 +53,8 @@ struct TrackingInfo { class ObjectView : public BGLView { public: - ObjectView(BRect rect, char* name, ulong resizingMode, - ulong options); + ObjectView(BRect rect, const char* name, + ulong resizingMode, ulong options); ~ObjectView(); virtual void MouseDown(BPoint point); diff --git a/src/apps/glteapot/TeapotWindow.cpp b/src/apps/glteapot/TeapotWindow.cpp index 4bafa9382d..4e847f1d52 100644 --- a/src/apps/glteapot/TeapotWindow.cpp +++ b/src/apps/glteapot/TeapotWindow.cpp @@ -11,8 +11,10 @@ #include "TeapotWindow.h" -TeapotWindow::TeapotWindow(BRect rect, char* name, window_type wt, ulong something) - : BDirectWindow(rect, name, wt, something) +TeapotWindow::TeapotWindow(BRect rect, const char* name, window_type wt, + ulong something) + : + BDirectWindow(rect, name, wt, something) { GLenum type = BGL_RGB | BGL_DEPTH | BGL_DOUBLE; diff --git a/src/apps/glteapot/TeapotWindow.h b/src/apps/glteapot/TeapotWindow.h index e16b7f33e8..689c4ce569 100644 --- a/src/apps/glteapot/TeapotWindow.h +++ b/src/apps/glteapot/TeapotWindow.h @@ -6,19 +6,24 @@ #ifndef _TEAPOT_WINDOW_ #define _TEAPOT_WINDOW_ + #include #include "ObjectView.h" + class TeapotWindow : public BDirectWindow { public: - TeapotWindow(BRect r, char* name, window_type wt, ulong something); + TeapotWindow(BRect r, const char* name, window_type wt, + ulong something); - virtual bool QuitRequested(); - virtual void DirectConnected( direct_buffer_info* info ); - virtual void MessageReceived(BMessage* msg); + virtual bool QuitRequested(); + virtual void DirectConnected( direct_buffer_info* info ); + virtual void MessageReceived(BMessage* msg); private: ObjectView* fObjectView; }; + + #endif diff --git a/src/apps/glteapot/error.cpp b/src/apps/glteapot/error.cpp index 499a71a80b..28e4f24e41 100644 --- a/src/apps/glteapot/error.cpp +++ b/src/apps/glteapot/error.cpp @@ -6,7 +6,7 @@ #include "error.h" void -fatalerror(char *s) +fatalerror(const char *s) { printf("FATAL ERROR: %s\n",s); } diff --git a/src/apps/glteapot/error.h b/src/apps/glteapot/error.h index 621f452544..26d27aa76b 100644 --- a/src/apps/glteapot/error.h +++ b/src/apps/glteapot/error.h @@ -8,7 +8,7 @@ #include -extern void fatalerror(char *); +extern void fatalerror(const char *); #define DEBUGGING 1