[17/17] eval: Discard return value from strtod()

Message ID 1408133595-22316-18-git-send-email-diego@biurrun.de
State New
Headers show

Commit Message

Diego Biurrun Aug. 15, 2014, 8:13 p.m.
The value is never used; this also avoids a warning from MSVC.
---

There is probably a prettier solution.

 libavutil/eval.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Luca Barbato Aug. 15, 2014, 10:11 p.m. | #1
On 15/08/14 22:13, Diego Biurrun wrote:
> The value is never used; this also avoids a warning from MSVC.
> ---
> 
> There is probably a prettier solution.
> 
>  libavutil/eval.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavutil/eval.c b/libavutil/eval.c
> index 31e9ebb..896f59d 100644
> --- a/libavutil/eval.c
> +++ b/libavutil/eval.c
> @@ -352,7 +352,7 @@ static int parse_dB(AVExpr **e, Parser *p, int *sign)
>         for example, -3dB is not the same as -(3dB) */
>      if (*p->s == '-') {
>          char *next;
> -        double av_unused ignored = strtod(p->s, &next);
> +        strtod(p->s, &next);

(void)strtod(..)

>          if (next != p->s && next[0] == 'd' && next[1] == 'B') {
>              *sign = 0;
>              return parse_primary(e, p);
>

Patch

diff --git a/libavutil/eval.c b/libavutil/eval.c
index 31e9ebb..896f59d 100644
--- a/libavutil/eval.c
+++ b/libavutil/eval.c
@@ -352,7 +352,7 @@  static int parse_dB(AVExpr **e, Parser *p, int *sign)
        for example, -3dB is not the same as -(3dB) */
     if (*p->s == '-') {
         char *next;
-        double av_unused ignored = strtod(p->s, &next);
+        strtod(p->s, &next);
         if (next != p->s && next[0] == 'd' && next[1] == 'B') {
             *sign = 0;
             return parse_primary(e, p);