From 4464d309faf6576ef6741f750415358356d1aa0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 29 Aug 2015 08:25:48 +0200 Subject: [PATCH] cert.py: remove messages for reading struct padding data. in the EXP-42 warning describe how it can be fixed --- addons/cert.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/cert.py b/addons/cert.py index cf5788c4e..18293c081 100644 --- a/addons/cert.py +++ b/addons/cert.py @@ -60,9 +60,7 @@ def exp42(data): arg2 = token.astOperand2.astOperand1.astOperand2 if token.astOperand1.str == 'memcmp' and (isLocalUnpackedStruct(arg1) or isLocalUnpackedStruct(arg2)): - reportError(token, 'style', 'EXP42-C Comparison of struct padding data') - if (token.astOperand1.str in ['memcpy', 'memmove']) and isLocalUnpackedStruct(arg2): - reportError(token, 'style', 'EXP42-C Reading struct padding data') + reportError(token, 'style', 'EXP42-C Comparison of struct padding data (fix either by packing the struct using \'#pragma pack\' or by rewriting the comparison)') # EXP46-C # Do not use a bitwise operator with a Boolean-like operand