Skip to content

Latest commit

 

History

History
45 lines (34 loc) · 1.03 KB

compiler-warning-level-1-c4533.md

File metadata and controls

45 lines (34 loc) · 1.03 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning (level 1) C4533
Compiler Warning (level 1) C4533
08/30/2022
C4533
C4533
359fecda-d540-46e5-b214-dbabe9ef50d2

Compiler Warning (level 1) C4533

initialization of 'variable' is skipped by 'instruction'

Remarks

An instruction in your program changed the flow of control, so an instruction that initialized a variable wasn't executed.

The /sdl (Enable Additional Security Checks) compiler option elevates this warning to an error.

Example

The following sample generates C4533. To resolve the issue, move the initialization before the jump instruction or after the target of the jump.

// C4533.cpp
// compile with: /W1
#include <stdio.h>

struct A
{
   int m_data;
};

int main()
{
   if (1)
   {
      goto Label;
   }

   A a = { 100 };

   Label:   // C4533
      printf("\n%d", a.m_data);   // prints an uninitialized value
}