From 82f413cfe5bc84a13eafa513286adffcc44d8df8 Mon Sep 17 00:00:00 2001 From: stephena Date: Sun, 20 Sep 2015 01:13:53 +0000 Subject: [PATCH] Enable a few extra compiler checks in the Linux build script, and fix a few warnings that gcc caught and clang missed. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3210 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- Makefile | 2 +- src/gui/EditTextWidget.cxx | 2 +- src/gui/PopUpWidget.cxx | 2 +- src/gui/Widget.cxx | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index bef0600cb..6ce1f4bc1 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,7 @@ ifdef CXXFLAGS else CXXFLAGS:= -O2 endif -CXXFLAGS+= -Wall +CXXFLAGS+= -Wall -Wextra -Wno-unused-parameter -Wno-ignored-qualifiers ifdef HAVE_GCC CXXFLAGS+= -Wno-multichar -Wunused -fno-rtti -Woverloaded-virtual -Wnon-virtual-dtor -std=c++11 endif diff --git a/src/gui/EditTextWidget.cxx b/src/gui/EditTextWidget.cxx index 1529f6421..5b9270bf6 100644 --- a/src/gui/EditTextWidget.cxx +++ b/src/gui/EditTextWidget.cxx @@ -84,7 +84,7 @@ void EditTextWidget::drawWidget(bool hilite) // Draw the text adjustOffset(); s.drawString(_font, editString(), _x + 2, _y + 2, getEditRect().width(), - !_changed ? _textcolor : kDbgChangedTextColor, + !_changed ? _textcolor : uInt32(kDbgChangedTextColor), kTextAlignLeft, -_editScrollOffset, false); // Draw the caret diff --git a/src/gui/PopUpWidget.cxx b/src/gui/PopUpWidget.cxx index 073d313de..1471641ee 100644 --- a/src/gui/PopUpWidget.cxx +++ b/src/gui/PopUpWidget.cxx @@ -147,7 +147,7 @@ void PopUpWidget::drawWidget(bool hilite) // Draw the label, if any if (_labelWidth > 0) s.drawString(_font, _label, _x, _y + myTextY, _labelWidth, - isEnabled() ? _textcolor : kColor, kTextAlignRight); + isEnabled() ? _textcolor : uInt32(kColor), kTextAlignRight); // Draw a thin frame around us. s.hLine(x, _y, x + w - 1, kColor); diff --git a/src/gui/Widget.cxx b/src/gui/Widget.cxx index edefb811d..1830c12dd 100644 --- a/src/gui/Widget.cxx +++ b/src/gui/Widget.cxx @@ -331,7 +331,7 @@ void StaticTextWidget::drawWidget(bool hilite) { FBSurface& s = _boss->dialog().surface(); s.drawString(_font, _label, _x, _y, _w, - isEnabled() ? _textcolor : kColor, _align); + isEnabled() ? _textcolor : uInt32(kColor), _align); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -397,7 +397,7 @@ void ButtonWidget::drawWidget(bool hilite) { FBSurface& s = _boss->dialog().surface(); s.drawString(_font, _label, _x, _y + (_h - _fontHeight)/2 + 1, _w, - !isEnabled() ? kColor : hilite ? _textcolorhi : _textcolor, _align); + !isEnabled() ? uInt32(kColor) : hilite ? _textcolorhi : _textcolor, _align); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -