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

            Bug ID: 16079
           Summary: False positive: Dereference of null pointer (confused
                    by conditional operator?)
           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 10550
  --> http://llvm.org/bugs/attachment.cgi?id=10550&action=edit
Preprocessed source of the problematic file

Hi,
as I told to the IRC, here it is the preprocessed source with the problem. The
message is reported for this code:

[code]
void DBaseStatusBar::BlendView (float blend[4])
{
    V_AddBlend (BaseBlendR / 255.f, BaseBlendG / 255.f, BaseBlendB / 255.f,
BaseBlendA, blend);
    V_AddPlayerBlend(CPlayer, blend, 1.0f, 228);

    if (screen->Accel2D || (CPlayer->camera != NULL && menuactive == MENU_Off
&& ConsoleState == c_up))
    {
        player_t *player = (CPlayer->camera != NULL && CPlayer->camera->player
!= NULL) ? CPlayer->camera->player : CPlayer; // <- here
        V_AddBlend (player->BlendR, player->BlendG, player->BlendB,
player->BlendA, blend);
    }

    V_SetBlend ((int)(blend[0] * 255.0f), (int)(blend[1] * 255.0f),
                (int)(blend[2] * 255.0f), (int)(blend[3] * 256.0f));
}
[/code]

-- 
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