[x264-devel] Shut up clang -Wuninitialized warning
Anton Mitrofanov
git at videolan.org
Thu Nov 13 13:52:03 CET 2014
x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Fri Sep 5 19:43:52 2014 +0400| [3df1d248dd8a4b0d0dffd149effe2bde38de49aa] | committer: Fiona Glaser
Shut up clang -Wuninitialized warning
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=3df1d248dd8a4b0d0dffd149effe2bde38de49aa
---
common/osdep.h | 2 --
encoder/ratecontrol.c | 2 +-
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/common/osdep.h b/common/osdep.h
index 52e445a..1780623 100644
--- a/common/osdep.h
+++ b/common/osdep.h
@@ -142,8 +142,6 @@ int x264_is_pipe( const char *path );
#define ALIGNED_ARRAY_N ALIGNED_ARRAY_16
#endif
-#define UNINIT(x) x=x
-
#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
#define UNUSED __attribute__((unused))
#define ALWAYS_INLINE __attribute__((always_inline)) inline
diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c
index 86aad96..3e92e38 100644
--- a/encoder/ratecontrol.c
+++ b/encoder/ratecontrol.c
@@ -2335,7 +2335,7 @@ static float rate_estimate_qscale( x264_t *h )
{
float q;
x264_ratecontrol_t *rcc = h->rc;
- ratecontrol_entry_t UNINIT(rce);
+ ratecontrol_entry_t rce = {0};
int pict_type = h->sh.i_type;
int64_t total_bits = 8*(h->stat.i_frame_size[SLICE_TYPE_I]
+ h->stat.i_frame_size[SLICE_TYPE_P]
More information about the x264-devel
mailing list