diff mbox

[FFmpeg-devel,1/2] avfilter/tests/integral: Fix build warning after adjust the location

Message ID 1549781638-1099-1-git-send-email-mypopydev@gmail.com
State Accepted
Commit 9f33b0ed392f508ddcd6299c89beeed5addce3ff
Headers show

Commit Message

Jun Zhao Feb. 10, 2019, 6:53 a.m. UTC
Fix build warning like "warning: ISO C90 forbids mixed declarations
and code" after adjust the location for malloc fail check.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
---
 libavfilter/tests/integral.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

Comments

Michael Niedermayer Feb. 11, 2019, 5:43 p.m. UTC | #1
On Sun, Feb 10, 2019 at 02:53:57PM +0800, Jun Zhao wrote:
> Fix build warning like "warning: ISO C90 forbids mixed declarations
> and code" after adjust the location for malloc fail check.
> 
> Signed-off-by: Jun Zhao <mypopydev@gmail.com>
> ---
>  libavfilter/tests/integral.c |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)

LGTM

thx

[...]
mypopy@gmail.com Feb. 12, 2019, 1:17 a.m. UTC | #2
On Tue, Feb 12, 2019 at 1:48 AM Michael Niedermayer <michaelni@gmx.at> wrote:
>
> On Sun, Feb 10, 2019 at 02:53:57PM +0800, Jun Zhao wrote:
> > Fix build warning like "warning: ISO C90 forbids mixed declarations
> > and code" after adjust the location for malloc fail check.
> >
> > Signed-off-by: Jun Zhao <mypopydev@gmail.com>
> > ---
> >  libavfilter/tests/integral.c |    9 +++++----
> >  1 files changed, 5 insertions(+), 4 deletions(-)
>
> LGTM
>
> thx
>
Pushed, Tks
diff mbox

Patch

diff --git a/libavfilter/tests/integral.c b/libavfilter/tests/integral.c
index 361bfd5..093ed39 100644
--- a/libavfilter/tests/integral.c
+++ b/libavfilter/tests/integral.c
@@ -33,6 +33,9 @@  static void display_integral(const uint32_t *ii, int w, int h, int lz_32)
 int main(void)
 {
     int ret = 0, xoff, yoff;
+    uint32_t *ii_start;
+    uint32_t *ii_start2;
+    NLMeansDSPContext dsp = {0};
 
     // arbitrary test source of size 6x4 and linesize=8
     const int w = 6, h = 5, lz = 8;
@@ -57,10 +60,8 @@  int main(void)
     if (!ii || !ii2)
         return -1;
 
-    uint32_t *ii_start  = ii  + ii_lz_32 + 1; // skip top 0-line and left 0-column
-    uint32_t *ii_start2 = ii2 + ii_lz_32 + 1; // skip top 0-line and left 0-column
-
-    NLMeansDSPContext dsp = {0};
+    ii_start  = ii  + ii_lz_32 + 1; // skip top 0-line and left 0-column
+    ii_start2 = ii2 + ii_lz_32 + 1; // skip top 0-line and left 0-column
 
     ff_nlmeans_init(&dsp);