summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-12-11 08:38:39 +0100
committerMarek Olšák <[email protected]>2010-12-11 13:37:57 +0100
commitc398f1544ea113279e5f038f4a643005743cab62 (patch)
tree4d4ed7c5964d5259369a32a71c619345a7c774d5 /src/gallium/auxiliary
parentd0990db6bd7d6e9e1cd780dc6b50ce00408a3cbc (diff)
tgsi: fix rbug compile error
../mesa/src/gallium/auxiliary/tgsi/tgsi_parse.h:139: error: dereferencing pointer ‘tokens.25’ does break strict-aliasing rules Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_parse.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_parse.h b/src/gallium/auxiliary/tgsi/tgsi_parse.h
index d4df5851764..2aafa2a6e83 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_parse.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_parse.h
@@ -136,7 +136,8 @@ tgsi_parse_token(
static INLINE unsigned
tgsi_num_tokens(const struct tgsi_token *tokens)
{
- struct tgsi_header header = *(const struct tgsi_header *) tokens;
+ struct tgsi_header header;
+ memcpy(&header, tokens, sizeof(header));
return header.HeaderSize + header.BodySize;
}