From de0c30dded45ea9956a2e7b241ce16641b30492f Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 8 Feb 2015 23:36:01 +0100 Subject: Static Code Analysis: handle unused variables more properly. Catch STL exception. Add more checks. Add proper cast to arithmetic operations. --- src/Common/Dictionary.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/Common/Dictionary.c') diff --git a/src/Common/Dictionary.c b/src/Common/Dictionary.c index 382e6b70..d6203e6b 100644 --- a/src/Common/Dictionary.c +++ b/src/Common/Dictionary.c @@ -22,11 +22,15 @@ static size_t DataPoolSize = 0; void AddDictionaryEntry (char *key, int intKey, void *value) { - if (key) - StringKeyMap[key] = value; + try + { + if (key) + StringKeyMap[key] = value; - if (intKey != 0) - IntKeyMap[intKey] = value; + if (intKey != 0) + IntKeyMap[intKey] = value; + } + catch (exception&) {} } -- cgit v1.2.3