summaryrefslogtreecommitdiffstats
path: root/generic/tkImgPhInstance.c
diff options
context:
space:
mode:
authordas <das>2009-06-30 00:56:29 (GMT)
committerdas <das>2009-06-30 00:56:29 (GMT)
commitcddcc530147879e27bcf91025fc6728fb087d8e2 (patch)
tree486c789f1ba88a841ef3162ce8911a86ac67a5ff /generic/tkImgPhInstance.c
parent8f9b8fd63b4da5f6f27b46c438c89f2baa15f0e8 (diff)
downloadtk-cddcc530147879e27bcf91025fc6728fb087d8e2.zip
tk-cddcc530147879e27bcf91025fc6728fb087d8e2.tar.gz
tk-cddcc530147879e27bcf91025fc6728fb087d8e2.tar.bz2
* generic/tkInt.h: add assert macros for clang static
analyzer and redefine Tcl_Panic to assert after panic in clang PURIFY builds. * generic/tkImgPhInstance.c: small fixes to make clang static * generic/tkTextDisp.c: analyzer happier. * generic/tkConfig.c: add clang assert for false positives * generic/tkUndo.c: from static analyzer.
Diffstat (limited to 'generic/tkImgPhInstance.c')
-rw-r--r--generic/tkImgPhInstance.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tkImgPhInstance.c b/generic/tkImgPhInstance.c
index 07fa0c0..816169e 100644
--- a/generic/tkImgPhInstance.c
+++ b/generic/tkImgPhInstance.c
@@ -17,7 +17,7 @@
* Department of Computer Science,
* Australian National University.
*
- * RCS: @(#) $Id: tkImgPhInstance.c,v 1.2 2009/02/06 08:12:07 das Exp $
+ * RCS: @(#) $Id: tkImgPhInstance.c,v 1.3 2009/06/30 00:56:29 das Exp $
*/
#include "tkImgPhoto.h"
@@ -337,7 +337,11 @@ TkImgPhotoGet(
}
XFree((char *) visInfoPtr);
- sprintf(buf, ((mono) ? "%d": "%d/%d/%d"), nRed, nGreen, nBlue);
+ if (mono) {
+ sprintf(buf, "%d", nRed);
+ } else {
+ sprintf(buf, "%d/%d/%d", nRed, nGreen, nBlue);
+ }
instancePtr->defaultPalette = Tk_GetUid(buf);
/*