#include <vector> std::vector<int>::iterator foo(); void bar(void*) {} int main() { void* p; while (foo() != foo() && (p = 0, true)) { bar(p); } return 0; }
Error results:
c: \ users \ jessepepper \ source \ repos \ testcode \ consoleapplication1 \ consoleapplication1.cpp (15): error C4703: potentially uninitialized local pointer variable 'p' is used
This is a kind of error, but very typical of the type of code you write.
-, , . C4703 4 ( , ). , (, , ), , (/W4 /Werror, , ).
/W4
/Werror
. , , ? ? , ( - ). , , , , .
, : p ( , foo() != foo()). p ( , - ). ( , , foo() != foo() , ). , , .
p
foo() != foo()
, . , , , , . , , ?
V++ 2017 Preview.
. , , albetit smelly.
. (. @SebastianRedl.) V++ 2017 , , , " " . - , "" - , " ". , , " " , , , . , IMO.
, . , , . , , .
, Visual Studio .
Source: https://habr.com/ru/post/1694637/More articles:Linux Shell Script: how to compare a specific field in a text document with specific text in an if - linux expressionSet the transparency / saturation of the palette in ggplot - colorsКак группировать новости на основе тегов, категорий, стран, использующих MS SQL - sqlУдалите шаблон с помощью sed, который имеет квадратные скобки и кавычки - regexCustom progress bar with user levels - androidCalculating C # percent with decimal type causes problems - decimalSpeed up sending SYN packets in python script - pythonIs there something like extension functions for Java or other popular languages? - javaImage opacity, rotation and inclusion - c #Migrating from mcrypt with Blowfish and ECB to OpenSSL - phpAll Articles