MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / is32BitIntegerReturn

Function is32BitIntegerReturn

lib/check64bit.cpp:39–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37static const CWE CWE758(758U); // Reliance on Undefined, Unspecified, or Implementation-Defined Behavior
38
39static bool is32BitIntegerReturn(const Function* func, const Settings& settings)
40{
41 if (settings.platform.sizeof_pointer != 8)
42 return false;
43 const ValueType* vt = func->arg->valueType();
44 return vt && vt->pointer == 0 && vt->isIntegral() && vt->getSizeOf(settings, ValueType::Accuracy::ExactOrZero, ValueType::SizeOf::Pointer) == 4;
45}
46
47static bool isFunctionPointer(const Token* tok)
48{

Callers 1

pointerassignmentMethod · 0.85

Calls 2

isIntegralMethod · 0.80
getSizeOfMethod · 0.80

Tested by

no test coverage detected