summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authornijtmans <nijtmans>2008-11-05 22:20:59 (GMT)
committernijtmans <nijtmans>2008-11-05 22:20:59 (GMT)
commit436906415b673fbac6d7ce14621ad07a9a78b4a2 (patch)
treebb9005f0a49cd1cc708acc016a5b556166154d74 /unix
parenta7112d75b06f0c7bba86d032d765f74116f4c41e (diff)
downloadtk-436906415b673fbac6d7ce14621ad07a9a78b4a2.zip
tk-436906415b673fbac6d7ce14621ad07a9a78b4a2.tar.gz
tk-436906415b673fbac6d7ce14621ad07a9a78b4a2.tar.bz2
fix [Bug 2226093] const changes not all correct
more internal -Wwrite-string warning fixes
Diffstat (limited to 'unix')
-rw-r--r--unix/tkUnixButton.c4
-rw-r--r--unix/tkUnixFont.c14
-rw-r--r--unix/tkUnixRFont.c14
3 files changed, 19 insertions, 13 deletions
diff --git a/unix/tkUnixButton.c b/unix/tkUnixButton.c
index b8be6b3..75e4df3 100644
--- a/unix/tkUnixButton.c
+++ b/unix/tkUnixButton.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: tkUnixButton.c,v 1.25 2007/12/13 15:28:50 dgp Exp $
+ * RCS: @(#) $Id: tkUnixButton.c,v 1.26 2008/11/05 22:20:59 nijtmans Exp $
*/
#include "tkInt.h"
@@ -57,7 +57,7 @@ Tk_ClassProcs tkpButtonProcs = {
*/
/* XPM */
-static char *button_images[] = {
+static const char *button_images[] = {
/* width height ncolors chars_per_pixel */
"52 26 7 1",
/* colors */
diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c
index b5feb2c..405b19c 100644
--- a/unix/tkUnixFont.c
+++ b/unix/tkUnixFont.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnixFont.c,v 1.37 2008/11/02 09:54:02 nijtmans Exp $
+ * RCS: @(#) $Id: tkUnixFont.c,v 1.38 2008/11/05 22:20:59 nijtmans Exp $
*/
#include "tkUnixInt.h"
@@ -1971,7 +1971,7 @@ FindSubFontForChar(
Tk_Uid faceName;
const char *fallback;
const char *const *aliases;
- const char *const *nameList;
+ char **nameList;
const char *const *anyFallbacks;
const char *const *const *fontFallbacks;
SubFont *subFontPtr;
@@ -2406,8 +2406,8 @@ CanUseFallback(
Tk_Uid hateFoundry;
const char *charset, *hateCharset;
unsigned bestScore[2];
- const char *const *nameList;
- const char *const *nameListOrig;
+ char **nameList;
+ char **nameListOrig;
char src[TCL_UTF_MAX];
FontAttributes want, got;
Display *display;
@@ -2913,7 +2913,8 @@ ListFontOrAlias(
int *numNamesPtr) /* Filled with length of returned array, or 0
* if no names were found. */
{
- char **nameList, **aliases;
+ char **nameList;
+ const char *const *aliases;
int i;
nameList = ListFonts(display, faceName, numNamesPtr);
@@ -2962,7 +2963,8 @@ IdentifySymbolEncodings(
FontAttributes *faPtr)
{
int i, j;
- char **aliases, **symbolClass;
+ const char *const *aliases;
+ const char *const *symbolClass;
symbolClass = TkFontGetSymbolClass();
for (i = 0; symbolClass[i] != NULL; i++) {
diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c
index 3bea31f..0a6be20 100644
--- a/unix/tkUnixRFont.c
+++ b/unix/tkUnixRFont.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: tkUnixRFont.c,v 1.25 2008/04/27 22:39:13 dkf Exp $
+ * RCS: @(#) $Id: tkUnixRFont.c,v 1.26 2008/11/05 22:20:59 nijtmans Exp $
*/
#include "tkUnixInt.h"
@@ -121,7 +121,8 @@ GetTkFontAttributes(
XftFont *ftFont,
TkFontAttributes *faPtr)
{
- char *family = "Unknown", **familyPtr = &family;
+ const char *family = "Unknown";
+ const char *const *familyPtr = &family;
int weight, slant, size, pxsize;
double ptsize;
@@ -468,9 +469,12 @@ TkpGetSubFonts(
Tcl_Obj *objv[3], *listPtr, *resultPtr;
UnixFtFont *fontPtr = (UnixFtFont *) tkfont;
FcPattern *pattern;
- char *family = "Unknown", **familyPtr = &family;
- char *foundry = "Unknown", **foundryPtr = &foundry;
- char *encoding = "Unknown", **encodingPtr = &encoding;
+ const char *family = "Unknown";
+ const char *const *familyPtr = &family;
+ const char *foundry = "Unknown";
+ const char *const *foundryPtr = &foundry;
+ const char *encoding = "Unknown";
+ const char *const *encodingPtr = &encoding;
int i;
resultPtr = Tcl_NewListObj(0, NULL);