Compound assignment expression 'X += X + N' is suspicious. Odd semicolon ';' after 'if/for/while' operator. V6011. Reference was invalidated because of destruction of the temporary object returned by the function. Use the RtlSecureZeroMemory() function to erase private data. The modulo by 1 operation is meaningless. Wrong variable is probably used in the for operator as an index. Appending an element and checking for key uniqueness is performed on two different variables. V009. Automatic unboxing of a variable may cause NullPointerException. Connect and share knowledge within a single location that is structured and easy to search. The function located to the right of the '|' and '&' operators will be called regardless of the value of the left operand. An identifier with array type passed as a function argument should not decay to a pointer. The 'switch' statement should have 'default' as the last label. Not all members of a class are initialized inside the constructor. Trying to return a value from a non-value returning function will result in a compilation error: A return statement that is not the last statement in a function is called an early return. Passing objects of incompatible types to the method of collection. V3012. V585. The function was annotated as dangerous. . : .' should be used here instead of 'foo = bar = baz ? V126. OWASP. Dereferencing the result of null-conditional access operator can lead to NullReferenceException. A return statement can return a value to the calling function. The 'new type(n)' pattern was detected. The 'A' class containing IDisposable members does not itself implement IDisposable. MISRA. As the diagnostic message states, the function does have a control path where a value isn't returned. AUTOSAR. V1039. The resource was acquired using 'X' function but was released using incompatible 'Y' function. :' operator, regardless of its conditional expression, always returns one and the same value. Consider inspecting the condition for mistakes. Expression inside assert statement can change object's state. V588. Consider inspecting the expression. If you haven't received our response, please do the following: More than N bits are required to store the value, but the expression evaluates to the T type which can only hold K bits. V1054. V1059. V6092. V3020. Unbounded functions performing string operations should not be used. V6048. All memory or resources allocated dynamically should be explicitly released. V6009. V584. V3016. V680. V3543. Comma operator ',' in array index expression. V573. V6104. MISRA. Probably meant: (T1)((T2)a + b). V125. V721. V6012. V2610. Variable was compared to zero before it was used as a divisor. MISRA. More than one sizeof() operator is used in one expression. V3132. Function returns a pointer to the internal string buffer of a local object, which will be destroyed. MISRA. Why does Acts not mention the deaths of Peter and Paul? Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support. V3010. [Serializable] attribute is missing. Your function should return a vector in every possible condition. Possible exception when deserializing type. The main function calls two functions: report_square and report_ratio. Is that what you want? Value of 'A' type is assigned to a pointer of 'B' type. It is possible that an incorrect variable is compared with null after type conversion using 'as' keyword. Consider inspecting the correctness of handling the N argument in the 'Foo' function. The 'X' counter is not used inside a nested loop. V3028. The object was used after it was verified against null. Incorrect shifting expression. Are there any canonical examples of the Prime Directive being broken that aren't shown on screen? V594. V1053. Postfix increment/decrement is senseless because this variable is overwritten. Moving an object in a return statement prevents copy elision. How can I control PNP and NPN transistors together from one pin? NullReferenceException is possible. V5303. V3059. V3087. V626. V2003. V3072. The 'i' variable should probably be incremented instead of the 'n' variable. Consider checking the use of this variable. It is complaining because within the first for loop, if block returns v but else if block does not return anything. V656. V765. The object is already of the same type. The value of uninitialized variable should not be used. V1096. V2565. Calling the 'delete' operator for a void pointer will cause undefined behavior. V503. V3154. Probably meant: 'CC::AA()'. The 'SuspendThread' function is usually used when developing a debugger. An odd precise comparison. Do not concatenate string literals with different prefixes. V6072. V1069. V591. Consider inspecting 'X'. It's probably an error or un-optimized code. This may be a potential error. MISRA. It is likely that a wrong variable is being incremented inside the 'for' operator. The 'Foo' function receives class-type variable as 'N'th actual argument. Suspicious semicolon ';' after 'if/for/while' operator. V816. V3531. V511. V516. A function should have a single point of exit at the end. Unreachable code should not be present in the project. V2578. V620. My statement was question specific. V3113. If you have parameters instead of "void" in your function's parentheses you have to return something. V3060. V3103. What should I follow, if two altimeters show different altitudes? Cyclomatic complexity: NN. Is a return statement mandatory for C++ functions that do not return void? Suspicious return of an always empty collection. Passing these values into the method will result in an exception. MISRA. Consider checking for typos. The object could have been garbage collected before the 'Target' property was accessed. AUTOSAR. V3538. V109. MISRA. Regression: objToJSON "nonvoid function does not return a value" error is back #31463 Closed pkaleta mentioned this issue on Jun 24, 2020 BUG: NUMPY_IMPORT_ARRAY_RETVAL undeclared when installing pandas 0.18.1 #34969 Closed Sign up for free to join this conversation on GitHub . V821. The language standard does not define order in which 'Foo' functions are called during evaluation of arguments. V3178. He also rips off an arm to use as a sword. Literal suffixes should not contain lowercase characters. V586. A Function procedure has at least one possible path through its code that does not return a value. The initial value of the index in the nested loop equals 'i'. A pattern was detected: A || (A && ). Possibility of decreased performance. What "benchmarks" means in "what are benchmarks for?". V3062. For more information, see Return type. Consider refactoring the 'Foo' function. V664. A code fragment from 'file' cannot be analyzed. Documentation - Arm Developer MISRA. The .exe and .i files are not supported. V741. Parameter of 'std::stop_token' type is not used inside function's body. V3185. V2583. V574. Unexpected uint64 behaviour 0xFFFF'FFFF'FFFF'FFFF - 1 = 0? Unexpected uint64 behaviour 0xFFFF'FFFF'FFFF'FFFF - 1 = 0? V1048. The other function parameter expects a file path instead. To learn more, see our tips on writing great answers. Buffer overflow is possible. OWASP. MISRA. MISRA. V6018. V508. Suspicious getter/setter implementation. V658. WPF: A class containing registered property does not correspond with a type that is passed as the ownerType.type. MISRA. Unreachable code should not be present in the project. no return statement in function returning non-void while using C++, How a top-ranked engineering school reimagined CS curriculum (Ep. Make sure the expression is correct. See NN argument of function 'Foo' in derived class and base class. The 'alloca' function is used inside the loop. This file is marked with copyleft license, which requires you to open the derived source code. If you called exit instead of throw_blah from foo, for instance, it wouldn't issue the error. V3168. Calling element access method for potentially empty collection may result in exception. V596. The expression is always true/false. AUTOSAR. V544. As soon as your program hits that, it will stop executing the loop and return to the main function, performing only a single iteration of the loop. I can give he a test with 2.0.3-RC1 and lease you perceive The return keyword is used during the end of to function to get the value back. V624. The object was created but it is not being used. V628. Strings were concatenated but not used. V1063. V506. V6004. AUTOSAR. Controlling expressions should not be invariant. V2522. V6095. V509. Usage of non memsize type for pointer arithmetic. I recently fixed something similar in #2898 which is not yet merged. V504. V558. Class member is initialized with dangling reference. Multiple copies of it will be created in all translation units that include this header file. V1080. Consider inspecting the expression. The name of 'X' field/property in a nested type is ambiguous. The standard input/output functions should not be used. Only values returned from fgetpos() can be used as arguments to fsetpos(). You are assuming that loop will always run, but, what if an empty string ends up getting submitted? MISRA. But, do are you sure you want your return statement inside your loop to begin with? Range intersections are possible within conditional expressions. Line splice results in a character sequence that matches the syntax of a universal-character-name. Consider inspecting it for a possible error. The 'x' variable is assigned to itself. V730. MISRA. Consider inspecting this expression. Its representation is implementation-defined. An object is used as an argument to its own method. V3040. V1019. The function expects the file to be opened in one mode, but it was opened in different mode. MISRA. It is possible that type name was omitted: throw MyException(a, b);. Consider using an explicit type cast to avoid overflow or loss of a fractional part. Possible excessive expression or typo. AUTOSAR. Non-void function must return value. PHP: rfc:void_return_type The variable is not used after copying. V3549. Inspect the Nth argument. AUTOSAR. V207. V747. V5010. Both operands of the '??' V221. The body of a loop\conditional statement should be enclosed in braces. Does this function have explicit return values on all control paths? See documentation for details. Further, testing by changing the function return type to int and changing the returns to 0 in the then code, 1 in the else if code, and 2 outside that shows assembly code that only returns 0 or 1, proving GCC was not just collapsing the third path into undefined behavior; it outright eliminates it because it is not possible. V6041. EXP12-C. Do not ignore values returned by functions Implicit type conversion of return value to memsize type. Is the code I've written here adequate to do that? An item with the same key has already been added. V1057. Suspicious pointer arithmetic with 'malloc/new'. Recurring check. Potential logical error. OWASP. V641. The 'default' label should be either the first or the last label of a 'switch' statement. All conditional inclusion preprocessor directives should reside in the same file as the conditional inclusion directive to which they are related. Passing 'BSTR ' to the 'SysAllocString' function may lead to incorrect object creation. Unsigned value is compared to the NN number. Consider inspecting the 'for' operator. Function exited without performing epilogue actions. Implicit assignment type conversion to memsize type. V655. V2567. The switch statement does not cover all values of the enum. Does a password policy with a restriction of repeated characters increase security? V1042. The expression is incorrect or it can be simplified. V3051. V1050. Why do we ask to use Business MISRA. V2588. The same sub-expression is present on both sides of the operator. V1087. Why typically people don't use biases in attention mechanism? V113. There should be no implicit integral-floating conversion. It is possible that 'else' block was forgotten or commented out, thus altering the program's operation logics. V3127. Consider reviewing the source code that uses the container. V831. V533. Casts between a pointer and a non-integer arithmetic type should not be performed. A new object is created, while a reference to an object is expected. V695. V5609. Function '