Ошибки, обнаруженные в Open Source проектах разработчиками PVS-Studio с помощью статического анализа

Мы регулярно проверяем различные open-source проекты с помощью PVS-Studio. Результаты проверки мы отправляем разработчикам и, как правило, описываем в статье. Помимо этого, мы пополняем базу примеров ошибок. Именно она и представлена ниже на этой странице.

Ошибки разделены по номеру диагностического сообщения, с помощью которого они были найдены. Номер диагностического правила приведён в левой колонке. Нажав на него, вы сможете ознакомиться в документации с описанием этой диагностики. В правом столбце приводится ссылка на соответствующие примеры ошибок.

С помощью некоторых диагностик мы пока ещё не находили ошибки в open-source проектах. Чем дальше вы будете двигаться по списку, тем больше будет диагностик без примеров. Ведь, чем позже была добавлена диагностика, тем в меньшем количестве проектов она успела показать свои возможности.

С тем, что проекты проверялись в разное время, связана ещё одна особенность базы ошибок. Мы специально не стали делать возможность посмотреть все ошибки, найденные в конкретном проекте. Это даст неправильное впечатление о количестве ошибок в проекте и возможностях анализатора. Анализатор быстро развивается. Если он нашёл 10 ошибок в проекте год назад, вовсе не означает, что он найдет столько же ошибок и сейчас. Сравните для примера отчеты о проверке ReactOS: первый отчет, второй отчет (прошло полтора года).

Вы можете предложить нам для проверки другие open-source проекты. Типы проектов, которые умеет проверять PVS-Studio, приведены в описании инструмента.

Эта база может послужить уникальным материалом для размышлений о разработке стандартов кодирования, написания статей о правилах программирования и помочь в других исследованиях связанных с повышением надежности программного обеспечения. Желаем интересных исследований.

V501 There are identical sub-expressions to the left and to the right of the 'foo' operator.
Посмотреть примеры ошибок для этих проектов: ADAPTIVE Communication Environment (ACE), Apache HTTP Server, Audacity, Blender, Chromium, Clang, Crystal Space 3D SDK, Dolphin Emulator, EA WebKit, EchoVNC, Fennec Media, IPP Samples, ...
V502 Perhaps the '?:' operator works in a different way than it was expected. The '?:' operator has a lower priority than the 'foo' operator.
Посмотреть примеры ошибок для этих проектов: Chromium, FCEUX, Grid Control Re-dux, IPP Samples, MongoDB, Newton Game Dynamics, OTS, ReactOS.
V503 This is a nonsensical comparison: pointer < 0.
Посмотреть примеры ошибок для этих проектов: Chromium, IPP Samples, Xpdf.
V504 It is highly probable that the semicolon ';' is missing after 'return' keyword.
Нам пока не попадались такие ошибки в публичных проектах.
V505 The 'alloca' function is used inside the loop. This can quickly overflow stack.
Посмотреть примеры ошибок для этих проектов: Crystal Space 3D SDK, DeSmuME, Multi-threaded Dynamic Queue, Pixie.
V506 Pointer to local variable 'X' is stored outside the scope of this variable. Such a pointer will become invalid.
Нам пока не попадались такие ошибки в публичных проектах.
V507 Pointer to local array 'X' is stored outside the scope of this array. Such a pointer will become invalid.
Посмотреть примеры ошибок для этих проектов: MySQL, Pixie, TortoiseSVN.
V508 The use of 'new type(n)' pattern was detected. Probably meant: 'new type[n]'.
Нам пока не попадались такие ошибки в публичных проектах.
V509 The 'throw' operator inside the destructor should be placed within the try..catch block. Raising exception inside the destructor is illegal.
Посмотреть примеры ошибок для этих проектов: OGRE, TortoiseSVN.
V510 The 'Foo' function is not expected to receive class-type variable as 'N' actual argument.
Посмотреть примеры ошибок для этих проектов: C++ Embedded Web Server, Quake-III-Arena, SMTP Client, TortoiseSVN, WinMerge.
V511 The sizeof() operator returns size of the pointer, and not of the array, in given expression.
Посмотреть примеры ошибок для этих проектов: Chromium, Intel AMT SDK, MySQL, ReactOS, Samba, Shareaza, Wolfenstein 3D.
V512 A call of the 'Foo' function will lead to a buffer overflow or underflow.
Посмотреть примеры ошибок для этих проектов: ADAPTIVE Communication Environment (ACE), Apache HTTP Server, Chromium, DeSmuME, Doom 3, Energy Checker SDK, Far Manager, Fennec Media, Game_Music_Emu library, IPP Samples, MAME, Miranda IM, ...
V513 Use _beginthreadex/_endthreadex functions instead of CreateThread/ExitThread functions.
Нам пока не попадались такие ошибки в публичных проектах.
V514 Dividing sizeof a pointer by another value. There is a probability of logical error presence.
Посмотреть примеры ошибок для этих проектов: Miranda IM, Notepad++, ReactOS.
V515 The 'delete' operator is applied to non-pointer.
Нам пока не попадались такие ошибки в публичных проектах.
V516 Consider inspecting an odd expression. Non-null function pointer is compared to null.
Посмотреть примеры ошибок для этих проектов: Audacity.
V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence.
Посмотреть примеры ошибок для этих проектов: Chromium, Doom 3, EIB Suite, ICU, Libwebpdecode, MAME, Notepad++, QT, Quake-III-Arena, ReactOS, SAGA GIS, TickerTape, ...
V518 The 'malloc' function allocates strange amount of memory calculated by 'strlen(expr)'. Perhaps the correct variant is strlen(expr) + 1.
Посмотреть примеры ошибок для этих проектов: FCEUX.
V519 The 'x' variable is assigned values twice successively. Perhaps this is a mistake.
Посмотреть примеры ошибок для этих проектов: CMake, Chromium, Clang, Crystal Space 3D SDK, D programming language, Doom 3, Fireflies, IPP Samples, IT++, Intel AMT SDK, Lugaru, Mozilla Firefox, ...
V520 The comma operator ',' in array index expression.
Посмотреть примеры ошибок для этих проектов: G3D Content Pak.
V521 Such expressions using the ',' operator are dangerous. Make sure the expression is correct.
Посмотреть примеры ошибок для этих проектов: G3D Content Pak, IPP Samples, Lugaru, OpenSSL, Quake-III-Arena, Trans-Proteomic Pipeline, Visualization Toolkit (VTK).
V522 Dereferencing of the null pointer might take place.
Посмотреть примеры ошибок для этих проектов: Blender, Chromium, Clang, D programming language, GeoLib, PCSX2, ReactOS, Visualization Toolkit (VTK), ffdshow.
V523 The 'then' statement is equivalent to the 'else' statement.
Посмотреть примеры ошибок для этих проектов: ADAPTIVE Communication Environment (ACE), Blender, Clang, IPP Samples, MAME, Multi-threaded Dynamic Queue, Notepad++, QT, ReactOS, Samba, Trans-Proteomic Pipeline, UCSniff, ...
V524 It is odd that the body of 'Foo_1' function is fully equivalent to the body of 'Foo_2' function.
Посмотреть примеры ошибок для этих проектов: Blender, Clang, MAME, Nmap Security Scanner, OpenCV, TortoiseSVN.
V525 The code containing the collection of similar blocks. Check items X, Y, Z, ... in lines N1, N2, N3, ...
Посмотреть примеры ошибок для этих проектов: Fennec Media, Miranda IM, MySQL, Notepad++, Win32++.
V526 The 'strcmp' function returns 0 if corresponding strings are equal. Consider examining the condition for mistakes.
Посмотреть примеры ошибок для этих проектов: wxWidgets.
V527 It is odd that the 'zero' value is assigned to pointer. Probably meant: *ptr = zero.
Посмотреть примеры ошибок для этих проектов: Apache HTTP Server, PNG library, ReactOS, Trans-Proteomic Pipeline.
V528 It is odd that pointer is compared with the 'zero' value. Probably meant: *ptr != zero.
Посмотреть примеры ошибок для этих проектов: CxImage, Doom 3, Fennec Media, Miranda IM, Mozilla Firefox, Notepad++, OpenCV, Trans-Proteomic Pipeline, Ultimate TCP/IP, Visualization Toolkit (VTK).
V529 Odd semicolon ';' after 'if/for/while' operator.
Посмотреть примеры ошибок для этих проектов: CamStudio, Fennec Media, Multi-threaded Dynamic Queue, ReactOS, Xpdf.
V530 The return value of function 'Foo' is required to be utilized.
Посмотреть примеры ошибок для этих проектов: Battle for Wesnoth, Chromium, EchoVNC, IPP Samples, Intel AMT SDK, MongoDB, Nmap Security Scanner, ReactOS, TortoiseSVN, Visualization Toolkit (VTK), WinMerge, wxWidgets, ...
V531 It is odd that a sizeof() operator is multiplied by sizeof().
Посмотреть примеры ошибок для этих проектов: NetDefender Firewall, ReactOS, XUIFramework.
V532 Consider inspecting the statement of '*pointer++' pattern. Probably meant: '(*pointer)++'.
Посмотреть примеры ошибок для этих проектов: Apache HTTP Server, DeSmuME, FCEUX, IPP Samples, OpenSSL, eMule.
V533 It is likely that a wrong variable is being incremented inside the 'for' operator. Consider reviewing 'X'.
Посмотреть примеры ошибок для этих проектов: Doom 3.
V534 It is likely that a wrong variable is being compared inside the 'for' operator. Consider reviewing 'X'.
Нам пока не попадались такие ошибки в публичных проектах.
V535 The variable 'X' is being used for this loop and for the outer loop.
Посмотреть примеры ошибок для этих проектов: Doom 3, IPP Samples, Lugaru, OGRE, Visualization Toolkit (VTK).
V536 Be advised that the utilized constant value is represented by an octal form.
Посмотреть примеры ошибок для этих проектов: Miranda IM, eLynx Image Processing SDK and Lab.
V537 Consider reviewing the correctness of 'X' item's usage.
Посмотреть примеры ошибок для этих проектов: Blender, IPP Samples, Miranda IM, Quake-III-Arena, ReactOS, Trinity Core.
V538 The line contains control character 0x0B (vertical tabulation).
Нам пока не попадались такие ошибки в публичных проектах.
V539 Consider inspecting iterators which are being passed as arguments to function 'Foo'.
Нам пока не попадались такие ошибки в публичных проектах.
V540 Member 'x' should point to string terminated by two 0 characters.
Посмотреть примеры ошибок для этих проектов: Chromium, Fennec Media.
V541 It is dangerous to print the string into itself.
Посмотреть примеры ошибок для этих проектов: CAMEL, Mozilla Firefox, PCSX2, UCSniff.
V542 Consider inspecting an odd type cast: 'Type1' to ' Type2'.
Посмотреть примеры ошибок для этих проектов: Miranda IM.
V543 It is odd that value 'X' is assigned to the variable 'Y' of HRESULT type.
Посмотреть примеры ошибок для этих проектов: WinMerge.
V544 It is odd that the value 'X' of HRESULT type is compared with 'Y'.
Нам пока не попадались такие ошибки в публичных проектах.
V545 Such conditional expression of 'if' operator is incorrect for the HRESULT type value 'Foo'. The SUCCEEDED or FAILED macro should be used instead.
Нам пока не попадались такие ошибки в публичных проектах.
V546 Member of a class is initialized by itself: 'Foo(Foo)'.
Нам пока не попадались такие ошибки в публичных проектах.
V547 Expression is always true/false.
Посмотреть примеры ошибок для этих проектов: ADAPTIVE Communication Environment (ACE), Apache HTTP Server, BCmenu, CamStudio, Chromium, DOSBox, DeSmuME, FCEUX, Geocoding with SQL-Server, ICU, IPP Samples, Intel AMT SDK, ...
V548 Consider reviewing type casting. TYPE X[][] in not equivalent to TYPE **X.
Нам пока не попадались такие ошибки в публичных проектах.
V549 The 'first' argument of 'Foo' function is equal to the 'second' argument.
Посмотреть примеры ошибок для этих проектов: Open Metronome, ReactOS.
V550 An odd precise comparison. It's probably better to use a comparison with defined precision: fabs(A - B) < Epsilon or fabs(A - B) > Epsilon.
Посмотреть примеры ошибок для этих проектов: CAMEL, ffdshow.
V551 The code under this 'case' label is unreachable.
Нам пока не попадались такие ошибки в публичных проектах.
V552 A bool type variable is being incremented. Perhaps another variable should be incremented instead.
Нам пока не попадались такие ошибки в публичных проектах.
V553 The length of function's body or class's declaration is more than 2000 lines long. You should consider refactoring the code.
Нам пока не попадались такие ошибки в публичных проектах.
V554 Incorrect use of smart pointer.
Посмотреть примеры ошибок для этих проектов: Chromium.
V555 The expression of the 'A - B > 0' kind will work as 'A != B'.
Нам пока не попадались такие ошибки в публичных проектах.
V556 The values of different enum types are compared.
Посмотреть примеры ошибок для этих проектов: Clang, XUIFramework.
V557 Array overrun is possible.
Посмотреть примеры ошибок для этих проектов: Blender, CAMEL, CMake, Chromium, Doom 3, Dynamic Universal Music Bibliotheque, Energy Checker SDK, IPP Samples, Irrlicht Engine, LAME, Mozilla Firefox, Notepad++, ...
V558 Function returns the pointer/reference to temporary local object.
Нам пока не попадались такие ошибки в публичных проектах.
V559 Suspicious assignment inside the condition expression of 'if/while/for' operator.
Посмотреть примеры ошибок для этих проектов: Intel AMT SDK, Miranda IM, ffdshow.
V560 A part of conditional expression is always true/false.
Посмотреть примеры ошибок для этих проектов: Apache HTTP Server, CxImage, DeSmuME, Fireflies, Lugaru, Miranda IM, MongoDB, NetDefender Firewall, Notepad++, PCRE, PCSX2, QT, ...
V561 It's probably better to assign value to 'foo' variable than to declare it anew.
Посмотреть примеры ошибок для этих проектов: FCEUX, Vscap.
V562 It's odd to compare a bool type value with a value of N.
Посмотреть примеры ошибок для этих проектов: Blender, ReactOS, Spvolren.
V563 It is possible that this 'else' branch must apply to the previous 'if' statement.
Посмотреть примеры ошибок для этих проектов: BCmenu, PeerBlock, Squirrel, Trans-Proteomic Pipeline.
V564 The '&' or '|' operator is applied to bool type value. You've probably forgotten to include parentheses or intended to use the '&&' or '||' operator.
Посмотреть примеры ошибок для этих проектов: Battle for Wesnoth, Blender, Chromium, DOSBox, Doom 3, FCEUX, MySQL, Network Security Services (NSS), Wolfenstein 3D.
V565 An empty exception handler. Silent suppression of exceptions can hide the presence of bugs in source code during testing.
Посмотреть примеры ошибок для этих проектов: G3D Content Pak.
V566 The integer constant is converted to pointer. Possibly an error or a bad coding style.
Нам пока не попадались такие ошибки в публичных проектах.
V567 Undefined behavior. The variable is modified while being used twice between sequence points.
Посмотреть примеры ошибок для этих проектов: Doom 3, Fennec Media, IPP Samples, Miranda IM, SAGA GIS, ffdshow.
V568 It's odd that the argument of sizeof() operator is the expression.
Посмотреть примеры ошибок для этих проектов: Apache HTTP Server, CxImage, Energy Checker SDK, FCEUX, Miranda IM, OpenCV, ReactOS, Wolfenstein 3D.
V569 Truncation of constant value.
Нам пока не попадались такие ошибки в публичных проектах.
V570 The variable is assigned to itself.
Посмотреть примеры ошибок для этих проектов: OpenCV, QT, Quake-III-Arena, ReactOS.
V571 Recurring check. This condition was already verified in previous line.
Посмотреть примеры ошибок для этих проектов: Blender, Energy Checker SDK, IPP Samples, Notepad++, QT.
V572 It is odd that the object which was created using 'new' operator is immediately casted to another type.
Посмотреть примеры ошибок для этих проектов: wxWidgets.
V573 Uninitialized variable 'Foo' was used. The variable was used to initialize itself.
Нам пока не попадались такие ошибки в публичных проектах.
V574 The pointer is used simultaneously as an array and as a pointer to single object.
Нам пока не попадались такие ошибки в публичных проектах.
V575 Function receives an odd argument.
Посмотреть примеры ошибок для этих проектов: Doom 3, Fennec Media, G3D Content Pak, Miranda IM, Mozilla Firefox, ReactOS.
V576 Incorrect format. Consider checking the N actual argument of the 'Foo' function.
Посмотреть примеры ошибок для этих проектов: CamStudio, DeSmuME, Doom 3, Energy Checker SDK, Far Manager, Intel AMT SDK, Mozilla Firefox, PeerBlock, ReactOS, ffdshow.
V577 Label is present inside a switch(). It is possible that these are misprints and 'default:' operator should be used instead.
Нам пока не попадались такие ошибки в публичных проектах.
V578 An odd bitwise operation detected. Consider verifying it.
Нам пока не попадались такие ошибки в публичных проектах.
V579 The 'Foo' function receives the pointer and its size as arguments. It is possibly a mistake. Inspect the N argument.
Посмотреть примеры ошибок для этих проектов: ADAPTIVE Communication Environment (ACE), Apache HTTP Server, Blender, CamStudio, Chromium, Dolphin Emulator, Doom 3, Far Manager, MAME, Mozilla Firefox, OpenSSL, PeerBlock, ...
V580 An odd explicit type casting. Consider verifying it.
Нам пока не попадались такие ошибки в публичных проектах.
V581 The conditional expressions of the 'if' operators situated alongside each other are identical.
Посмотреть примеры ошибок для этих проектов: MongoDB.
V582 Consider reviewing the source code which operates the container.
Нам пока не попадались такие ошибки в публичных проектах.
V583 The '?:' operator, regardless of its conditional expression, always returns one and the same value.
Посмотреть примеры ошибок для этих проектов: MAME.
V584 The same value is present on both sides of the operator. The expression is incorrect or it can be simplified.
Посмотреть примеры ошибок для этих проектов: Far Manager.
V585 An attempt to release the memory in which the 'Foo' local variable is stored.
Нам пока не попадались такие ошибки в публичных проектах.
V586 The 'Foo' function is called twice for deallocation of the same resource.
Посмотреть примеры ошибок для этих проектов: Blender.
V587 An odd sequence of assignments of this kind: A = B; B = A;.
Нам пока не попадались такие ошибки в публичных проектах.
V588 The expression of the 'A =+ B' kind is utilized. Consider reviewing it, as it is possible that 'A += B' was meant.
Посмотреть примеры ошибок для этих проектов: Libxml2, Trans-Proteomic Pipeline.
V589 The expression of the 'A =- B' kind is utilized. Consider reviewing it, as it is possible that 'A -= B' was meant.
Нам пока не попадались такие ошибки в публичных проектах.
V590 Consider inspecting this expression. The expression is excessive or contains a misprint.
Посмотреть примеры ошибок для этих проектов: FCEUX, Notepad++, ReactOS, Stickies.
V591 Non-void function should return a value.
Посмотреть примеры ошибок для этих проектов: Quake-III-Arena.
V592 The expression was enclosed by parentheses twice: ((expression)). One pair of parentheses is unnecessary or misprint is present.
Посмотреть примеры ошибок для этих проектов: wxWidgets.
V593 Consider reviewing the expression of the 'A = B == C' kind. The expression is calculated as following: 'A = (B == C)'.
Посмотреть примеры ошибок для этих проектов: ReactOS, Vscap.
V594 The pointer steps out of array's bounds.
Посмотреть примеры ошибок для этих проектов: ReactOS.
V595 The pointer was utilized before it was verified against nullptr.
Посмотреть примеры ошибок для этих проектов: ADAPTIVE Communication Environment (ACE), Blender, Clang, Doom 3, EchoVNC, IPP Samples, LAME, MAME, MongoDB, Mozilla Firefox, Newton Game Dynamics, OpenCV, ...
V596 The object was created but it is not being used. The 'throw' keyword could be missing.
Нам пока не попадались такие ошибки в публичных проектах.
V597 The compiler could delete the 'memset' function call, which is used to flush 'Foo' buffer. The RtlSecureZeroMemory() function should be used to erase the private data.
Посмотреть примеры ошибок для этих проектов: CamStudio, Crypto++, Dolphin Emulator, Samba, Tor, Trans-Proteomic Pipeline, UCSniff, eMule.
V598 The 'memset/memcpy' function is used to nullify/copy the fields of 'Foo' class. Virtual method table will be damaged by this.
Посмотреть примеры ошибок для этих проектов: IPP Samples.
V599 The virtual destructor is not present, although the 'Foo' class contains virtual functions.
Посмотреть примеры ошибок для этих проектов: WinMerge.
V600 Consider inspecting the condition. The 'Foo' pointer is always not equal to NULL.
Посмотреть примеры ошибок для этих проектов: Notepad++, OpenSSL.
V601 An odd implicit type casting.
Посмотреть примеры ошибок для этих проектов: IPP Samples.
V602 Consider inspecting this expression. '<' possibly should be replaced with '<<'.
Нам пока не попадались такие ошибки в публичных проектах.
V603 The object was created but it is not being used. If you wish to call constructor, 'this->Foo::Foo(....)' should be used.
Посмотреть примеры ошибок для этих проектов: Trans-Proteomic Pipeline, eMule.
V604 It is odd that the number of iterations in the loop equals to the size of the pointer.
Нам пока не попадались такие ошибки в публичных проектах.
V605 Consider verifying the expression. An unsigned value is compared to the number -NN.
Нам пока не попадались такие ошибки в публичных проектах.
V606 Ownerless token 'Foo'.
Посмотреть примеры ошибок для этих проектов: RunAsAdmin Explorer Shim.
V607 Ownerless expression 'Foo'.
Посмотреть примеры ошибок для этих проектов: IPP Samples, Trans-Proteomic Pipeline.
V608 Recurring sequence of explicit type casts.
Нам пока не попадались такие ошибки в публичных проектах.
V609 Divide or mod by zero.
Нам пока не попадались такие ошибки в публичных проектах.
V610 Undefined behavior. Check the shift operator.
Посмотреть примеры ошибок для этих проектов: Blender, Clang, DeSmuME, FAAC, Game_Music_Emu library, MAME, OpenCV, ReactOS, Samba, UCSniff, lib7z.
V611 The memory allocation and deallocation methods are incompatible.
Посмотреть примеры ошибок для этих проектов: OpenCV.
V612 An unconditional 'break/continue/return/goto' within a loop.
Посмотреть примеры ошибок для этих проектов: Clang, D programming language, Embedded SSL Library, OpenCV, PCSX2, ReactOS, Trans-Proteomic Pipeline.
V613 Strange pointer arithmetic with 'malloc/new'.
Нам пока не попадались такие ошибки в публичных проектах.
V614 Uninitialized variable 'Foo' used.
Посмотреть примеры ошибок для этих проектов: IPP Samples, MPC-HC, ReactOS, Trans-Proteomic Pipeline.
V615 An odd explicit conversion from 'float *' type to 'double *' type.
Нам пока не попадались такие ошибки в публичных проектах.
V616 The 'Foo' named constant with the value of 0 is used in the bitwise operation.
Нам пока не попадались такие ошибки в публичных проектах.
V617 Consider inspecting the condition. An argument of the '|' bitwise operation always contains a non-zero value.
Посмотреть примеры ошибок для этих проектов: ABackup, OpenSSL, ResizableLib, ffdshow.
V618 It's dangerous to call the 'Foo' function in such a manner, as the line being passed could contain format specification. The example of the safe code: printf(\"%s\", str);
Нам пока не попадались такие ошибки в публичных проектах.
V619 An array is being utilized as a pointer to single object.
Нам пока не попадались такие ошибки в публичных проектах.
V620 It's unusual that the expression of sizeof(T)*N kind is being summed with the pointer to T type.
Нам пока не попадались такие ошибки в публичных проектах.
V621 Consider inspecting the 'for' operator. It's possible that the loop will be executed incorrectly or won't be executed at all.
Нам пока не попадались такие ошибки в публичных проектах.
V622 Consider inspecting the 'switch' statement. It's possible that the first 'case' operator is missing.
Нам пока не попадались такие ошибки в публичных проектах.
V623 Consider inspecting the '?:' operator. A temporary object is being created and subsequently destroyed.
Нам пока не попадались такие ошибки в публичных проектах.
V624 The constant NN is being utilized. The resulting value could be inaccurate. Consider using the M_NN constant from <math.h>.
Посмотреть примеры ошибок для этих проектов: ffdshow.
V625 Consider inspecting the 'for' operator. Initial and final values of the iterator are the same.
Нам пока не попадались такие ошибки в публичных проектах.
V626 Consider checking for misprints. It's possible that ',' should be replaced by ';'.
Нам пока не попадались такие ошибки в публичных проектах.
V627 Consider inspecting the expression. The argument of sizeof() is the macro which expands to a number.
Посмотреть примеры ошибок для этих проектов: Samba.
V628 It's possible that the line was commented out improperly, thus altering the program's operation logics.
Нам пока не попадались такие ошибки в публичных проектах.
V629 It's possible that the line was commented out improperly, thus altering the program's operation logics.
Посмотреть примеры ошибок для этих проектов: Clang, Xpdf.
V630 The 'malloc' function is used to allocate memory for an array of objects which are classes containing constructors/destructors.
Нам пока не попадались такие ошибки в публичных проектах.
V631 Consider inspecting the 'Foo' function call. Defining an absolute path to the file or directory is considered a poor style.
Посмотреть примеры ошибок для этих проектов: ffdshow.
V632 Consider inspecting the NN argument of the 'Foo' function. It is odd that the argument is of the 'T' type.
Нам пока не попадались такие ошибки в публичных проектах.
V633 Consider inspecting the expression. Probably the '!=' should be used here.
Нам пока не попадались такие ошибки в публичных проектах.
V634 The priority of the '+' operation is higher than that of the '<<' operation. It's possible that parentheses should be used in the expression.
Нам пока не попадались такие ошибки в публичных проектах.
V635 Consider inspecting the expression. The length should probably be multiplied by the sizeof(wchar_t).
Нам пока не попадались такие ошибки в публичных проектах.
V636 The expression was implicitly casted from integer type to real type. Consider utilizing an explicit type cast to avoid overflow or loss of a fractional part.
Посмотреть примеры ошибок для этих проектов: CxImage, libevent.
V637 Two opposite conditions were encountered. The second condition is always false.
Посмотреть примеры ошибок для этих проектов: OpenCV.
V638 A terminal null is present inside a string. The '\\0xNN' characters were encountered. Probably meant: '\\xNN'.
Нам пока не попадались такие ошибки в публичных проектах.
V639 Consider inspecting the expression for function call. It is possible that one of the closing ')' brackets was positioned incorrectly.
Нам пока не попадались такие ошибки в публичных проектах.
V640 The code's operational logic does not correspond with its formatting.
Посмотреть примеры ошибок для этих проектов: ReactOS, XUIFramework, Xpdf.
V641 The size of the allocated memory buffer is not a multiple of the element size.
Нам пока не попадались такие ошибки в публичных проектах.
V642 Saving the function result inside the 'byte' type variable is inappropriate. The significant bits could be lost breaking the program's logic.
Посмотреть примеры ошибок для этих проектов: ReactOS, Xpdf.
V643 Unusual pointer arithmetic. The value of the 'char' type is being added to the string pointer.
Нам пока не попадались такие ошибки в публичных проектах.
V644 A suspicious function declaration. It is possible that the T type object was meant to be created.
Нам пока не попадались такие ошибки в публичных проектах.
V645 The function call could lead to the buffer overflow. The bounds should not contain the size of the buffer, but a number of characters it can hold.
Посмотреть примеры ошибок для этих проектов: ReactOS.
V646 Consider inspecting the application's logic. It's possible that 'else' keyword is missing.
Нам пока не попадались такие ошибки в публичных проектах.
V647 The value of 'A' type is assigned to the pointer of 'B' type.
Нам пока не попадались такие ошибки в публичных проектах.
V648 Priority of the '&&' operation is higher than that of the '||' operation.
Посмотреть примеры ошибок для этих проектов: Wolfenstein 3D.
V649 There are two 'if' statements with identical conditional expressions. The first 'if' statement contains function return. This means that the second 'if' statement is senseless.
Посмотреть примеры ошибок для этих проектов: Miranda IM, RunAsAdmin Explorer Shim, Wolfenstein 3D.
V650 Type casting operation is utilized 2 times in succession. Next, the '+' operation is executed. Probably meant: (T1)((T2)a + b).
Нам пока не попадались такие ошибки в публичных проектах.
V651 An odd operation of the 'sizeof(X)/sizeof(T)' kind is performed, where 'X' is of the 'class' type.
Нам пока не попадались такие ошибки в публичных проектах.
V652 The operation is executed 3 or more times in succession.
Нам пока не попадались такие ошибки в публичных проектах.
V653 A suspicious string consisting of two parts is used for array initialization. It is possible that a comma is missing.
Нам пока не попадались такие ошибки в публичных проектах.
V654 The condition of loop is always true/false.
Нам пока не попадались такие ошибки в публичных проектах.
V655 The strings was concatenated but are not utilized. Consider inspecting the expression.
Нам пока не попадались такие ошибки в публичных проектах.
V656 Variables are initialized through the call to the same function. It's probably an error or un-optimized code.
Посмотреть примеры ошибок для этих проектов: Doom 3, ReactOS.
V657 It's odd that this function always returns one and the same value of NN.
Нам пока не попадались такие ошибки в публичных проектах.
V658 A value is being subtracted from the unsigned variable. This can result in an overflow. In such a case, the comparison operation can potentially behave unexpectedly.
Нам пока не попадались такие ошибки в публичных проектах.
V659 Declarations of functions with 'Foo' name differ in the 'const' keyword only, but the bodies of these functions have different composition. This is suspicious and can possibly be an error.
Нам пока не попадались такие ошибки в публичных проектах.
V660 The program contains an unused label and a function call: 'CC:AA()'. It's possible that the following was intended: 'CC::AA()'.
Нам пока не попадались такие ошибки в публичных проектах.
V661 A suspicious expression 'A[B < C]'. Probably meant 'A[B] < C'.
Нам пока не попадались такие ошибки в публичных проектах.
V662 Consider inspecting the loop expression. Different containers are utilized for setting up initial and final values of the iterator.
Нам пока не попадались такие ошибки в публичных проектах.
V663 Infinite loop is possible. The 'cin.eof()' condition is insufficient to break from the loop. Consider adding the 'cin.fail()' function call to the conditional expression.
Нам пока не попадались такие ошибки в публичных проектах.
V664 The pointer is being dereferenced on the initialization list before it is verified against null inside the body of the constructor function.
Нам пока не попадались такие ошибки в публичных проектах.
V665 Possibly, the usage of '#pragma warning(default: X)' is incorrect in this context. The '#pragma warning(push/pop)' should be used instead.
Нам пока не попадались такие ошибки в публичных проектах.
V666 Consider inspecting NN argument of the function 'Foo'. It is possible that the value does not correspond with the length of a string which was passed with the YY argument.
Нам пока не попадались такие ошибки в публичных проектах.
V667 The 'throw' operator does not possess any arguments and is not situated within the 'catch' block.
Нам пока не попадались такие ошибки в публичных проектах.
V668 There is no sense in testing the pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error.
Нам пока не попадались такие ошибки в публичных проектах.