epezent / implot

Immediate Mode Plotting
MIT License
4.66k stars 520 forks source link

Build Warnings #331

Closed dgm3333 closed 2 years ago

dgm3333 commented 2 years ago

Perhaps worth addressing in the next "tidyup"? I'm getting various build warnings using MSVC 20+. Mostly about lack of initialization Obviously I could block them with the compiler flag, but I don't want to in case I incorrectly forget to initialise variables in my own code, but it is a bit annoying to have to check that I'm not missing anything amongst the implot warnings...

Severity Code Description Project File Line Suppression State Warning C26812 The enum type 'ImPlotAxisFlags_' is unscoped. Prefer 'enum class' over 'enum' (Enum.3). .\implot\implotinternal.h 111 Warning C26812 The enum type 'ImPlotFlags' is unscoped. Prefer 'enum class' over 'enum' (Enum.3). .\implot\implot_internal.h 111 Warning C26495 Variable 'ImPlotAnnotation::Clamp' is uninitialized. Always initialize a member variable (type.6). .\implot\implot_internal.h 431 Warning C26495 Variable 'ImPlotAnnotation::ColorBg' is uninitialized. Always initialize a member variable (type.6). .\implot\implot_internal.h 431 Warning C26495 Variable 'ImPlotAnnotation::ColorFg' is uninitialized. Always initialize a member variable (type.6). .\implot\implot_internal.h 431 Warning C26495 Variable 'ImPlotAnnotation::TextOffset' is uninitialized. Always initialize a member variable (type.6). .\implot\implot_internal.h 431 Warning C26495 Variable 'ImPlotTick::PixelPos' is uninitialized. Always initialize a member variable (type.6). .\implot\implot_internal.h 532 Warning C26495 Variable 'ImPlotAxis::FormatSpec' is uninitialized. Always initialize a member variable (type.6). .\implot\implot_internal.h 629 Warning C26495 Variable 'ImPlotAxis::ID' is uninitialized. Always initialize a member variable (type.6). .\implot\implot_internal.h 629 Warning C26495 Variable 'ImPlotAxis::LinM' is uninitialized. Always initialize a member variable (type.6). .\implot\implot_internal.h 629 Warning C26495 Variable 'ImPlotAxis::LogD' is uninitialized. Always initialize a member variable (type.6). .\implot\implot_internal.h 629 Warning C26495 Variable 'ImPlotAxis::RangeCond' is uninitialized. Always initialize a member variable (type.6). .\implot\implot_internal.h 629 Warning C26495 Variable 'ImPlotAxis::Vertical' is uninitialized. Always initialize a member variable (type.6). .\implot\implot_internal.h 629 Warning C26451 Arithmetic overflow: Using operator '-' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '-' to avoid overflow (io.2). .\implot\implot_internal.h 741 Warning C26451 Arithmetic overflow: Using operator '-' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '-' to avoid overflow (io.2). .\implot\implot_internal.h 746 Warning C26495 Variable 'ImPlotItem::Color' is uninitialized. Always initialize a member variable (type.6). .\implot\implot_internal.h 861 Warning C26495 Variable 'ImPlotLegend::PreviousLocation' is uninitialized. Always initialize a member variable (type.6). .\implot\implot_internal.h 886 Warning C26495 Variable 'ImPlotItemGroup::ID' is uninitialized. Always initialize a member variable (type.6). .\implot\implot_internal.h 904 Warning C26495 Variable 'ImPlotSubplot::Flags' is uninitialized. Always initialize a member variable (type.6). .\implot\implot_internal.h 1046
Warning C26495 Variable 'ImPlotSubplot::ID' is uninitialized. Always initialize a member variable (type.6). .\implot\implot_internal.h 1046
Warning C26495 Variable 'ImPlotSubplot::PreviousFlags' is uninitialized. Always initialize a member variable (type.6). .\implot\implot_internal.h 1046
Warning C26495 Variable 'ImPlotSubplot::TempSizes' is uninitialized. Always initialize a member variable (type.6). .\implot\implot_internal.h 1046