[VDPAU] [PATCH] vdpau_trace: Fix GCC 4.8 build warnings
Robert Morell
rmorell at nvidia.com
Fri Sep 5 19:16:28 PDT 2014
vdpau_trace.cpp: In function 'void _vdp_cap_dump_video_mixer_attribute_value(VdpVideoMixerAttribute, const void*, bool)':
vdpau_trace.cpp:539:48: error: cast from type 'const void*' to type 'const float (**)[3][4]' casts away qualifiers [-Werror=cast-qual]
ptr = *(VdpCSCMatrix const * *)value;
^
vdpau_trace.cpp: In function 'void _vdp_cap_dump_bitstream_buffer_list(uint32_t, const VdpBitstreamBuffer*)':
vdpau_trace.cpp:1175:52: error: cast from type 'const void* const' to type 'uint8_t* {aka unsigned char*}' casts away qualifiers [-Werror=cast-qual]
uint8_t * ptr = (uint8_t * )buffers[0].bitstream;
^
Signed-off-by: Robert Morell <rmorell at nvidia.com>
---
trace/vdpau_trace.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/trace/vdpau_trace.cpp b/trace/vdpau_trace.cpp
index 31c988acb0f7..27b7177bedcc 100644
--- a/trace/vdpau_trace.cpp
+++ b/trace/vdpau_trace.cpp
@@ -536,7 +536,7 @@ static void _vdp_cap_dump_video_mixer_attribute_value(
// the value, so it can either fill in the value, or NULL out the
// pointer.
if (get_operation) {
- ptr = *(VdpCSCMatrix const * *)value;
+ ptr = *(VdpCSCMatrix const * const *)value;
}
else {
ptr = (VdpCSCMatrix const *)value;
@@ -1172,7 +1172,7 @@ static void _vdp_cap_dump_bitstream_buffer_list(
buffers[0].bitstream_bytes
);
if (_vdp_cap_data.level >= LEVEL_DATA) {
- uint8_t * ptr = (uint8_t * )buffers[0].bitstream;
+ const uint8_t * ptr = (const uint8_t * )buffers[0].bitstream;
for (uint32_t i = 0; i < buffers[0].bitstream_bytes; ++i) {
fprintf(_vdp_cap_data.fp, "%02x ", ptr[i]);
}
--
1.8.5.5
More information about the VDPAU
mailing list