{
    "defects": [
        {
            "checker": "GCC_ANALYZER_WARNING",
            "cwe": 775,
            "language": "c/c++",
            "tool": "gcc-analyzer",
            "key_event_idx": 1,
            "events": [
                {
                    "file_name": "/builddir/build/BUILD/initscripts-10.25-build/initscripts-10.25/src/genhostid.c",
                    "line": 0,
                    "event": "scope_hint",
                    "message": "In function ‘main’",
                    "verbosity_level": 1
                },
                {
                    "file_name": "/builddir/build/BUILD/initscripts-10.25-build/initscripts-10.25/src/genhostid.c",
                    "line": 45,
                    "column": 16,
                    "event": "warning[-Wanalyzer-fd-leak]",
                    "message": "leak of file descriptor ‘open(\"/dev/random\", 0)’",
                    "verbosity_level": 0
                },
                {
                    "file_name": "/builddir/build/BUILD/initscripts-10.25-build/initscripts-10.25/src/genhostid.c",
                    "line": 43,
                    "column": 12,
                    "event": "note",
                    "message": "(1) opened here",
                    "verbosity_level": 2
                },
                {
                    "file_name": "/builddir/build/BUILD/initscripts-10.25-build/initscripts-10.25/src/genhostid.c",
                    "line": 45,
                    "column": 6,
                    "event": "note",
                    "message": "(2) assuming ‘open(\"/dev/random\", 0)’ is a valid file descriptor (>= 0)",
                    "verbosity_level": 2
                },
                {
                    "file_name": "/builddir/build/BUILD/initscripts-10.25-build/initscripts-10.25/src/genhostid.c",
                    "line": 45,
                    "column": 6,
                    "event": "note",
                    "message": "(3) following ‘false’ branch...",
                    "verbosity_level": 2
                },
                {
                    "file_name": "/builddir/build/BUILD/initscripts-10.25-build/initscripts-10.25/src/genhostid.c",
                    "line": 45,
                    "column": 19,
                    "event": "note",
                    "message": "(4) ...to here",
                    "verbosity_level": 2
                },
                {
                    "file_name": "/builddir/build/BUILD/initscripts-10.25-build/initscripts-10.25/src/genhostid.c",
                    "line": 45,
                    "column": 16,
                    "event": "note",
                    "message": "(5) ‘open(\"/dev/random\", 0)’ leaks here; was opened at (1)",
                    "verbosity_level": 2
                }
            ]
        }
    ]
}
