summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2002-02-22 13:13:13 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2002-02-22 13:13:13 (GMT)
commitfceafda7d034e62bd12688c6f2a85c3dc32c67cc (patch)
tree2e4d1a72d108982dc6933674f108878f7d5ff46a
parent5ea47f877cf7111d2293b4809c2ebe62bf0710e8 (diff)
downloadtk-fceafda7d034e62bd12688c6f2a85c3dc32c67cc.zip
tk-fceafda7d034e62bd12688c6f2a85c3dc32c67cc.tar.gz
tk-fceafda7d034e62bd12688c6f2a85c3dc32c67cc.tar.bz2
Stop GCC from issuing warnings about things that don't matter.
-rw-r--r--ChangeLog5
-rw-r--r--unix/tkUnixMenu.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 27caaf9..9484ce5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-02-22 Donal K. Fellows <fellowsd@cs.man.ac.uk>
+
+ * unix/tkUnixMenu.c (GetMenuLabelGeometry,DrawMenuEntryLabel):
+ Stop meaningless GCC warnings.
+
2002-02-21 Jeff Hobbs <jeffh@ActiveState.com>
* doc/panedwindow.n:
diff --git a/unix/tkUnixMenu.c b/unix/tkUnixMenu.c
index c2d4e41..930a973 100644
--- a/unix/tkUnixMenu.c
+++ b/unix/tkUnixMenu.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnixMenu.c,v 1.6 2002/01/17 03:35:01 dgp Exp $
+ * RCS: @(#) $Id: tkUnixMenu.c,v 1.7 2002/02/22 13:13:13 dkf Exp $
*/
#include "tkPort.h"
@@ -707,7 +707,7 @@ DrawMenuEntryLabel(menuPtr, mePtr, d, gc, tkfont, fmPtr, x, y, width, height)
int activeBorderWidth;
int leftEdge;
int imageHeight, imageWidth;
- int textHeight, textWidth;
+ int textHeight = 0, textWidth = 0; /* stop GCC warning */
int haveImage = 0, haveText = 0;
int imageXOffset = 0, imageYOffset = 0;
int textXOffset = 0, textYOffset = 0;
@@ -1473,7 +1473,7 @@ GetMenuLabelGeometry(mePtr, tkfont, fmPtr, widthPtr, heightPtr)
* portion */
{
TkMenu *menuPtr = mePtr->menuPtr;
- int haveImage = 0, haveText = 0;
+ int haveImage = 0;
if (mePtr->image != NULL) {
Tk_SizeOfImage(mePtr->image, widthPtr, heightPtr);