Skip to content

intel: Avoid aliasing violation

Matt Turner requested to merge mattst88/drm:intel-aliasing into main
../intel/test_decode.c: In function ‘compare_batch’:
../intel/test_decode.c:109:39: error: dereferencing type-punned pointer might break strict-aliasing rules [-Werror=strict-aliasing]
  109 |         out = open_memstream((char **)&ptr, &size);
      |                                       ^~~~
cc1: some warnings being treated as errors

The fix is simple: just declare ptr as a char * to begin with.

Merge request reports

Loading