summaryrefslogtreecommitdiff
path: root/vp9/decoder
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2014-12-23 11:44:11 -0500
committerJames Zern <jzern@google.com>2014-12-23 11:44:11 -0500
commit59d63e610a3005a5f7a6a4a92abe0c76a2190d88 (patch)
treed948c6956d24a10789a7fe3ea8e4049d38ff4dbd /vp9/decoder
parent4e04fa6dea716d4dafdb8a1d1dedc15455cddf3b (diff)
downloadlibvpx-59d63e610a3005a5f7a6a4a92abe0c76a2190d88.tar
libvpx-59d63e610a3005a5f7a6a4a92abe0c76a2190d88.tar.gz
libvpx-59d63e610a3005a5f7a6a4a92abe0c76a2190d88.tar.bz2
libvpx-59d63e610a3005a5f7a6a4a92abe0c76a2190d88.zip
vp9: fix -Wclobbered (longjmp + local variables)
Local variables used at the setjmp() site need to be marked volatile. Relevant excerpt from the 'man longjmp': =============== The values of automatic variables are unspecified after a call to longjmp() if they meet all the following criteria: · they are local to the function that made the corresponding setjmp(3) call; · their values are changed between the calls to setjmp(3) and longjmp(); and · they are not declared as volatile. =============== Change-Id: I093e6eeeedbf5f781d202248ca701ba2c29d3064
Diffstat (limited to 'vp9/decoder')
-rw-r--r--vp9/decoder/vp9_decoder.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/vp9/decoder/vp9_decoder.c b/vp9/decoder/vp9_decoder.c
index 1406b4034..bb7bb565a 100644
--- a/vp9/decoder/vp9_decoder.c
+++ b/vp9/decoder/vp9_decoder.c
@@ -63,8 +63,8 @@ static void vp9_dec_free_mi(VP9_COMMON *cm) {
}
VP9Decoder *vp9_decoder_create() {
- VP9Decoder *const pbi = vpx_memalign(32, sizeof(*pbi));
- VP9_COMMON *const cm = pbi ? &pbi->common : NULL;
+ VP9Decoder *volatile const pbi = vpx_memalign(32, sizeof(*pbi));
+ VP9_COMMON *volatile const cm = pbi ? &pbi->common : NULL;
if (!cm)
return NULL;
@@ -243,7 +243,7 @@ static void swap_frame_buffers(VP9Decoder *pbi) {
int vp9_receive_compressed_data(VP9Decoder *pbi,
size_t size, const uint8_t **psource) {
- VP9_COMMON *const cm = &pbi->common;
+ VP9_COMMON *volatile const cm = &pbi->common;
const uint8_t *source = *psource;
int retcode = 0;