From c4d7e5e67ecfcd9730bd512483390369fc9982db Mon Sep 17 00:00:00 2001 From: "Timothy B. Terriberry" Date: Wed, 27 Oct 2010 16:04:02 -0700 Subject: Eliminate more warnings. This eliminates a large set of warnings exposed by the Mozilla build system (Use of C++ comments in ISO C90 source, commas at the end of enum lists, a couple incomplete initializers, and signed/unsigned comparisons). It also eliminates many (but not all) of the warnings expose by newer GCC versions and _FORTIFY_SOURCE (e.g., calling fread and fwrite without checking the return values). There are a few spurious warnings left on my system: ../vp8/encoder/encodemb.c:274:9: warning: 'sz' may be used uninitialized in this function gcc seems to be unable to figure out that the value shortcut doesn't change between the two if blocks that test it here. ../vp8/encoder/onyx_if.c:5314:5: warning: comparison of unsigned expression >= 0 is always true ../vp8/encoder/onyx_if.c:5319:5: warning: comparison of unsigned expression >= 0 is always true This is true, so far as it goes, but it's comparing against an enum, and the C standard does not mandate that enums be unsigned, so the checks can't be removed. Change-Id: Iaf689ae3e3d0ddc5ade00faa474debe73b8d3395 --- vp8/common/alloccommon.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'vp8/common/alloccommon.c') diff --git a/vp8/common/alloccommon.c b/vp8/common/alloccommon.c index 408c25306..9dce8c8f6 100644 --- a/vp8/common/alloccommon.c +++ b/vp8/common/alloccommon.c @@ -56,7 +56,7 @@ int vp8_alloc_frame_buffers(VP8_COMMON *oci, int width, int height) vp8_de_alloc_frame_buffers(oci); - // our internal buffers are always multiples of 16 + /* our internal buffers are always multiples of 16 */ if ((width & 0xf) != 0) width += 16 - (width & 0xf); @@ -153,7 +153,7 @@ void vp8_setup_version(VP8_COMMON *cm) cm->full_pixel = 1; break; default: - //4,5,6,7 are reserved for future use + /*4,5,6,7 are reserved for future use*/ cm->no_lpf = 0; cm->simpler_lpf = 0; cm->use_bilinear_mc_filter = 0; @@ -177,10 +177,10 @@ void vp8_create_common(VP8_COMMON *oci) oci->clr_type = REG_YUV; oci->clamp_type = RECON_CLAMP_REQUIRED; - // Initialise reference frame sign bias structure to defaults + /* Initialise reference frame sign bias structure to defaults */ vpx_memset(oci->ref_frame_sign_bias, 0, sizeof(oci->ref_frame_sign_bias)); - // Default disable buffer to buffer copying + /* Default disable buffer to buffer copying */ oci->copy_buffer_to_gf = 0; oci->copy_buffer_to_arf = 0; } -- cgit v1.2.3