From fef8f89bf21e879ce76c241192871ee50d07fcd1 Mon Sep 17 00:00:00 2001 From: das Date: Thu, 8 Nov 2007 17:37:34 +0000 Subject: fix warnings --- macosx/tkMacOSXDebug.c | 4 ++-- macosx/tkMacOSXDialog.c | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/macosx/tkMacOSXDebug.c b/macosx/tkMacOSXDebug.c index affd1a1..65c7df9 100644 --- a/macosx/tkMacOSXDebug.c +++ b/macosx/tkMacOSXDebug.c @@ -54,7 +54,7 @@ * software in accordance with the terms specified in this * license. * - * RCS: @(#) $Id: tkMacOSXDebug.c,v 1.17 2007/11/08 15:45:31 das Exp $ + * RCS: @(#) $Id: tkMacOSXDebug.c,v 1.18 2007/11/08 17:37:34 das Exp $ */ #include "tkMacOSXPrivate.h" @@ -521,7 +521,7 @@ TkMacOSXGetNamedDebugSymbol( if (!addr) { const struct mach_header *mh = NULL; uint32_t i, n = _dyld_image_count(); - size_t module_len; + size_t module_len = 0; if (module && *module) { module_len = strlen(module); diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c index 0d83052..cb0d474 100644 --- a/macosx/tkMacOSXDialog.c +++ b/macosx/tkMacOSXDialog.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXDialog.c,v 1.33 2007/10/26 10:35:33 das Exp $ + * RCS: @(#) $Id: tkMacOSXDialog.c,v 1.34 2007/11/08 17:37:34 das Exp $ */ #include "tkMacOSXPrivate.h" @@ -1110,7 +1110,7 @@ OpenFileFilterProc( if (!theInfo->isFolder) { OSType fileType; - StringPtr fileNamePtr; + StringPtr fileNamePtr = NULL; Tcl_DString fileNameDString; int i; FileFilter *filterPtr; @@ -1126,7 +1126,6 @@ OpenFileFilterProc( strncpy(fileName, (char*) fileNamePtr + 1, len); fileName[len] = '\0'; fileNamePtr = (unsigned char*) fileName; - } else if ((theItem->descriptorType == typeFSRef)) { OSStatus err; FSRef *theRef = (FSRef *) *theItem->dataHandle; @@ -1140,8 +1139,6 @@ OpenFileFilterProc( uniFileName.length, &fileNameDString); fileNamePtr = (unsigned char*) Tcl_DStringValue(&fileNameDString); - } else { - fileNamePtr = NULL; } } if (ofdPtr->usePopup) { -- cgit v0.12