From 70e06397ac48b79487f6ce4ff1e0517e922fa73f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 6 Aug 2015 11:45:14 +0200 Subject: in find-duplicated-sids, also check for redefinitions Change-Id: I0c90efb477a7e9ee4acac98f97c9ff77e75cdec4 --- bin/find-duplicated-sids.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/find-duplicated-sids.py b/bin/find-duplicated-sids.py index ccd7a630f0f2..8f5e4ff9246f 100755 --- a/bin/find-duplicated-sids.py +++ b/bin/find-duplicated-sids.py @@ -60,7 +60,11 @@ with a.stdout as txt: if (sidTextValue.find("\"") != -1): continue # ignore the multiline macros if (sidTextValue.find("\\") != -1): continue - sidNameToValue[sidName] = sidTextValue + # check for redefinitions + if sidName[0:4] == "SID_" and sidNameToValue.has_key(sidName): + print "Redefinition:\n\t", sidNameToOriginalLine[sidName], "\n\t" , originalLine + else: + sidNameToValue[sidName] = sidTextValue sidNameToOriginalLine[sidName] = originalLine # decode the constants into their numeric values recursively -- cgit