Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…null pointer will be deleted, not trap'
  • Loading branch information...
commit 927df34d4ba6ffb83c8ca60cc2f3b48cb2593c1d 1 parent 4e6f57a
davilla davilla authored

Showing 2 changed files with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. +2 2 lib/DllAvCodec.h
  2. +1 1  lib/DllAvFormat.h
4 lib/DllAvCodec.h
@@ -146,8 +146,8 @@ class DllAvCodec : public DllDynamic, DllAvCodecInterface
146 146 CSingleLock lock(DllAvCodec::m_critSection);
147 147 return ::avcodec_open2(avctx, codec, options);
148 148 }
149   - virtual int avcodec_open2_dont_call(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options) { *(int *)0x0 = 0; return 0; }
150   - virtual int avcodec_close_dont_call(AVCodecContext *avctx) { *(int *)0x0 = 0; return 0; }
  149 + virtual int avcodec_open2_dont_call(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options) { *(volatile int *)0x0 = 0; return 0; }
  150 + virtual int avcodec_close_dont_call(AVCodecContext *avctx) { *(volatile int *)0x0 = 0; return 0; }
151 151 virtual AVCodec *avcodec_find_decoder(enum CodecID id) { return ::avcodec_find_decoder(id); }
152 152 virtual AVCodec *avcodec_find_encoder(enum CodecID id) { return ::avcodec_find_encoder(id); }
153 153 virtual int avcodec_close(AVCodecContext *avctx)
2  lib/DllAvFormat.h
@@ -112,7 +112,7 @@ class DllAvFormat : public DllDynamic, DllAvFormatInterface
112 112 CSingleLock lock(DllAvCodec::m_critSection);
113 113 return ::av_register_all();
114 114 }
115   - virtual void av_register_all_dont_call() { *(int* )0x0 = 0; }
  115 + virtual void av_register_all_dont_call() { *(volatile int* )0x0 = 0; }
116 116 virtual AVInputFormat *av_find_input_format(const char *short_name) { return ::av_find_input_format(short_name); }
117 117 virtual int url_feof(AVIOContext *s) { return ::url_feof(s); }
118 118 virtual void avformat_close_input(AVFormatContext **s) { ::avformat_close_input(s); }

0 comments on commit 927df34

Please sign in to comment.
Something went wrong with that request. Please try again.