Browse files

fixed compiler warning spew under clang 'indirection of non-volatile …

…null pointer will be deleted, not trap'
  • Loading branch information...
1 parent 4e6f57a commit 927df34d4ba6ffb83c8ca60cc2f3b48cb2593c1d @davilla davilla committed May 24, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/DllAvCodec.h
  2. +1 −1 lib/DllAvFormat.h
View
4 lib/DllAvCodec.h
@@ -146,8 +146,8 @@ class DllAvCodec : public DllDynamic, DllAvCodecInterface
CSingleLock lock(DllAvCodec::m_critSection);
return ::avcodec_open2(avctx, codec, options);
}
- virtual int avcodec_open2_dont_call(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options) { *(int *)0x0 = 0; return 0; }
- virtual int avcodec_close_dont_call(AVCodecContext *avctx) { *(int *)0x0 = 0; return 0; }
+ virtual int avcodec_open2_dont_call(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options) { *(volatile int *)0x0 = 0; return 0; }
+ virtual int avcodec_close_dont_call(AVCodecContext *avctx) { *(volatile int *)0x0 = 0; return 0; }
virtual AVCodec *avcodec_find_decoder(enum CodecID id) { return ::avcodec_find_decoder(id); }
virtual AVCodec *avcodec_find_encoder(enum CodecID id) { return ::avcodec_find_encoder(id); }
virtual int avcodec_close(AVCodecContext *avctx)
View
2 lib/DllAvFormat.h
@@ -112,7 +112,7 @@ class DllAvFormat : public DllDynamic, DllAvFormatInterface
CSingleLock lock(DllAvCodec::m_critSection);
return ::av_register_all();
}
- virtual void av_register_all_dont_call() { *(int* )0x0 = 0; }
+ virtual void av_register_all_dont_call() { *(volatile int* )0x0 = 0; }
virtual AVInputFormat *av_find_input_format(const char *short_name) { return ::av_find_input_format(short_name); }
virtual int url_feof(AVIOContext *s) { return ::url_feof(s); }
virtual void avformat_close_input(AVFormatContext **s) { ::avformat_close_input(s); }

0 comments on commit 927df34

Please sign in to comment.