summaryrefslogtreecommitdiffstats
path: root/generic/tkText.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-05-26 15:28:09 (GMT)
committernijtmans <nijtmans>2010-05-26 15:28:09 (GMT)
commit44956ea2ae237e8111e50cfde47883f81e24fb7b (patch)
treeb40da66d41c9fb7b65513e77544b1afb6c20b36f /generic/tkText.c
parentd59e4da7e1c57fe1962f24cafedbc04cf2cc5b2b (diff)
downloadtk-44956ea2ae237e8111e50cfde47883f81e24fb7b.zip
tk-44956ea2ae237e8111e50cfde47883f81e24fb7b.tar.gz
tk-44956ea2ae237e8111e50cfde47883f81e24fb7b.tar.bz2
Fix some gcc strict-aliasing warnings (discovered with "-Wstrict-aliasing=2"
Diffstat (limited to 'generic/tkText.c')
-rw-r--r--generic/tkText.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tkText.c b/generic/tkText.c
index 3010d6e..ae0a49c 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkText.c,v 1.99 2010/03/11 09:43:19 dkf Exp $
+ * RCS: @(#) $Id: tkText.c,v 1.100 2010/05/26 15:28:09 nijtmans Exp $
*/
#include "default.h"
@@ -4712,7 +4712,7 @@ DumpLine(
&& (segPtr->typePtr == &tkTextLeftMarkType
|| segPtr->typePtr == &tkTextRightMarkType)) {
const char *name;
- TkTextMark *markPtr = (TkTextMark *) &segPtr->body;
+ TkTextMark *markPtr = &segPtr->body.mark;
if (segPtr == textPtr->insertMarkPtr) {
name = "insert";
@@ -4747,7 +4747,7 @@ DumpLine(
what);
} else if ((what & TK_DUMP_IMG) &&
(segPtr->typePtr == &tkTextEmbImageType)) {
- TkTextEmbImage *eiPtr = (TkTextEmbImage *)&segPtr->body;
+ TkTextEmbImage *eiPtr = &segPtr->body.ei;
const char *name = (eiPtr->name == NULL) ? "" : eiPtr->name;
TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, textPtr,
@@ -4756,7 +4756,7 @@ DumpLine(
command, &index, what);
} else if ((what & TK_DUMP_WIN) &&
(segPtr->typePtr == &tkTextEmbWindowType)) {
- TkTextEmbWindow *ewPtr = (TkTextEmbWindow *)&segPtr->body;
+ TkTextEmbWindow *ewPtr = &segPtr->body.ew;
const char *pathname;
if (ewPtr->tkwin == (Tk_Window) NULL) {