diff options
author | nijtmans <nijtmans> | 2010-05-26 15:28:09 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-05-26 15:28:09 (GMT) |
commit | 96388f2bfaadc202305bca7550b7d68a2efc2443 (patch) | |
tree | b40da66d41c9fb7b65513e77544b1afb6c20b36f /generic | |
parent | 74e0826f412502f3f6323ed8ac95da10a19cb65b (diff) | |
download | tk-96388f2bfaadc202305bca7550b7d68a2efc2443.zip tk-96388f2bfaadc202305bca7550b7d68a2efc2443.tar.gz tk-96388f2bfaadc202305bca7550b7d68a2efc2443.tar.bz2 |
Fix some gcc strict-aliasing warnings (discovered with "-Wstrict-aliasing=2"
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkText.c | 8 |
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) { |