http://llvm.org/bugs/show_bug.cgi?id=16400

            Bug ID: 16400
           Summary: False positive in checker: Function call argument is
                    an uninitialized value
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Created attachment 10725
  --> http://llvm.org/bugs/attachment.cgi?id=10725&action=edit
wireshark/tshark.c Line: 2721

Tested with clang r184521 on Ubuntu 13.04, x86.

Clang claims that one of the arguments of a function call is uninitialized.

However, it only reaches that code path after:

"Assuming 'do_dissection' is 0", and
"Assuming 'do_dissection' is not equal to 0",

with no usage or access of do_dissection in between.

do_dissection is a "static gboolean", and if you examine the docs:

( http://svn.abisource.com/wv/tags/release-version-0-7-11/glib-wv/glib.h )

typedef int    gint;
typedef gint   gboolean;

So to my understanding, a gboolean is effectively an int.

The attached file is tshark.c from wireshark r50104.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to