projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0990db
)
tgsi: fix rbug compile error
author
Marek Olšák
<maraeo@gmail.com>
Sat, 11 Dec 2010 07:38:39 +0000
(08:38 +0100)
committer
Marek Olšák
<maraeo@gmail.com>
Sat, 11 Dec 2010 12:37:57 +0000
(13:37 +0100)
../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 <maraeo@gmail.com>
src/gallium/auxiliary/tgsi/tgsi_parse.h
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/tgsi/tgsi_parse.h
b/src/gallium/auxiliary/tgsi/tgsi_parse.h
index d4df5851764e91664e02747ad1c6635ab934767a..2aafa2a6e839a536f87569da924dbda812834e31 100644
(file)
--- 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;
}