mathworks.com
Programming Defects - continued
Format string specifiers and
arguments mismatch
String specifiers do not match corresponding arguments
Function called from signal
handler not asynchronous-safe
Call to interrupted function causes undefined program behavior
Function called from signal
handler not asynchronous-safe
(strict)
Call to interrupted function causes undefined program behavior
Improper array initialization
Incorrect array initialization when using initializers
Incorrect pointer scaling
Implicit scaling in pointer arithmetic might be ignored
Invalid assumptions about
memory organization
Address is computed by adding or subtracting from address of a
variable
Invalid file position
fsetpos() is invoked with a file position argument not obtained from
fgetpos()
Invalid use of = (assignment)
operator
Assignment in conditional statement
Invalid use of == (equality)
operator
Equality operation in assignment statement
Invalid use of standard
library routine
Wrong arguments to standard library function
Invalid va _ list argument
Variable argument list used after invalidation with va_end or not
initialized with va_start or va_copy
Memory comparison of
padding data
memcmp compares data stored in structure padding
Memory comparison of strings
memcmp compares data stored in strings after the null terminator
Missing byte reordering when
transfering data
Different endianness of host and network
Missing null in string array
String does not terminate with null character
Misuse of a FILE object
Use of copy of FILE object
Misuse of structure with
flexible array member
Memory allocation ignores flexible array member
Misuse of sign-extended
character value
Data type conversion with sign extension causes unexpected
behavior
Misuse of return value from
nonreentrant standard
function
Pointer to static buffer from previous call is used despite a subse-
quent call that modifies the buffer
Misuse of errno
errno incorrectly checked for error conditions
Modification of internal
buffer returned from nonreen-
trant standard function
Function attempts to modify internal buffer returned from a nonre-
entrant standard function
Overlapping assignment
Memory overlap between left and right sides of an assignment
Possible misuse of sizeof
Use of sizeof operator can cause unintended results