[libav-bugs] [Bug 712] New: Unchecked conversion from double to enum

bugzilla at libav.org bugzilla at libav.org
Mon Jun 30 13:22:38 CEST 2014


           Summary: Unchecked conversion from double to enum
           Product: Libav
           Version: git HEAD
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: general
        AssignedTo: bugzilla at libav.org
        ReportedBy: siretart at tauware.de

From: Michael Tautschnig <mt at debian.org>
To: bugs at debian.org
Subject: Unchecked conversion from double to enum
Date: Sat, 24 May 2014 17:07:38 +0100
[Message part 1 (text/plain, inline)]
Package: libav
Version: 6:10.1-1
Usertags: goto-cc

During a rebuild of all packages in a clean sid chroot (and
the build failed with the following error. Please note that we use our research
compiler tool-chain (using tools from the cbmc package), which permits extended
reporting on type inconsistencies at link time.

gcc -I. -I/srv/jenkins-slave/workspace/sid-goto-cc-libav/libav-10.1
-fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security  
-std=c99 -fomit-frame-pointer -pthread -I/usr/include/p11-kit-1
-I/usr/include/freetype2 -I/usr/include/opencv -I/usr/include/opus -D_REENTRANT
-I/usr/include/p11-kit-1 -I/usr/include/schroedinger-1.0 -I/usr/include/orc-0.4
-g -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith
-Wredundant-decls -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef
-Wmissing-prototypes -Wstrict-prototypes -Wno-parentheses -Wno-switch
-Wno-format-zero-length -Wno-pointer-sign -O3 -fno-math-errno -fno-signed-zeros
-fno-tree-vectorize -Werror=implicit-function-declaration
-Werror=missing-prototypes -Werror=return-type
-Werror=declaration-after-statement -Werror=vla -Wno-maybe-uninitialized  -MMD
-MF libavfilter/vf_select.d -MT libavfilter/vf_select.o -c -o
line 218 function select_frame: in expression `select->var_values[(signed long
conversion from `double' to `int': implicit conversion not permitted
make[1]: *** [libavfilter/vf_select.o] Error 64
make[1]: *** Waiting for unfinished jobs....

Given that av_get_picture_type_char requires an enum argument:


ideally an explicit conversion with suitable checks on values should be
performed here:


But looking a few lines above at least an explicit (int) type cast would be in
line with the remainder of the code.


Configure bugmail: https://bugzilla.libav.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the libav-bugs mailing list