Browse Source

lavfi/af_afir,af_aiir: Remove a variable that is always -1.

Fixes two warnings:
libavfilter/af_afir.c:194:45: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
     int dx = FFABS(x1-x0), sx = x0 < x1 ? 1 : -1;
                                 ~~~~~~~~~~~~^~~~
libavfilter/af_aiir.c:689:45: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
     int dx = FFABS(x1-x0), sx = x0 < x1 ? 1 : -1;
                                 ~~~~~~~~~~~~^~~~
tags/n4.1
Carl Eugen Hoyos 7 years ago
parent
commit
9cb3d8fcb7
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      libavfilter/af_afir.c
  2. +2
    -2
      libavfilter/af_aiir.c

+ 2
- 2
libavfilter/af_afir.c View File

@@ -191,7 +191,7 @@ static void drawtext(AVFrame *pic, int x, int y, const char *txt, uint32_t color

static void draw_line(AVFrame *out, int x0, int y0, int x1, int y1, uint32_t color)
{
int dx = FFABS(x1-x0), sx = x0 < x1 ? 1 : -1;
int dx = FFABS(x1-x0);
int dy = FFABS(y1-y0), sy = y0 < y1 ? 1 : -1;
int err = (dx>dy ? dx : -dy) / 2, e2;

@@ -205,7 +205,7 @@ static void draw_line(AVFrame *out, int x0, int y0, int x1, int y1, uint32_t col

if (e2 >-dx) {
err -= dy;
x0 += sx;
x0--;
}

if (e2 < dy) {


+ 2
- 2
libavfilter/af_aiir.c View File

@@ -686,7 +686,7 @@ static void drawtext(AVFrame *pic, int x, int y, const char *txt, uint32_t color

static void draw_line(AVFrame *out, int x0, int y0, int x1, int y1, uint32_t color)
{
int dx = FFABS(x1-x0), sx = x0 < x1 ? 1 : -1;
int dx = FFABS(x1-x0);
int dy = FFABS(y1-y0), sy = y0 < y1 ? 1 : -1;
int err = (dx>dy ? dx : -dy) / 2, e2;

@@ -700,7 +700,7 @@ static void draw_line(AVFrame *out, int x0, int y0, int x1, int y1, uint32_t col

if (e2 >-dx) {
err -= dy;
x0 += sx;
x0--;
}

if (e2 < dy) {


Loading…
Cancel
Save