diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py index 11f4dfaf..fbce38da 100644 --- a/BaseTools/Scripts/PatchCheck.py +++ b/BaseTools/Scripts/PatchCheck.py @@ -504,11 +504,11 @@ class GitDiffCheck: 'but DEBUG_' + mo.group(1) + ' is now recommended', line) - rp_file = os.path.realpath(self.filename) - rp_script = os.path.realpath(__file__) - if line.find('__FUNCTION__') != -1 and rp_file != rp_script: - self.added_line_error('__FUNCTION__ was used, but __func__ ' - 'is now recommended', line) + #rp_file = os.path.realpath(self.filename) + #rp_script = os.path.realpath(__file__) + #if line.find('__FUNCTION__') != -1 and rp_file != rp_script: + # self.added_line_error('__FUNCTION__ was used, but __func__ ' + # 'is now recommended', line) split_diff_re = re.compile(r''' (?P diff --git a/MdePkg/Library/BaseLib/SafeString.c b/MdePkg/Library/BaseLib/SafeString.c index 859db2ef..707fb1fb 100644 --- a/MdePkg/Library/BaseLib/SafeString.c +++ b/MdePkg/Library/BaseLib/SafeString.c @@ -17,7 +17,7 @@ if (!(Expression)) { \ DEBUG ((DEBUG_VERBOSE, \ "%a(%d) %a: SAFE_STRING_CONSTRAINT_CHECK(%a) failed. Return %r\n", \ - __FILE__, DEBUG_LINE_NUMBER, __func__, DEBUG_EXPRESSION_STRING (Expression), Status)); \ + __FILE__, DEBUG_LINE_NUMBER, __FUNCTION__, DEBUG_EXPRESSION_STRING (Expression), Status)); \ return Status; \ } \ } while (FALSE)