Fixing errors reported by Klocwork tool
authorSachin Agrawal <sachin.agrawal@intel.com>
Fri, 20 Feb 2015 14:20:56 +0000 (06:20 -0800)
committerPatrick Lankswert <patrick.lankswert@intel.com>
Mon, 23 Feb 2015 16:00:22 +0000 (16:00 +0000)
commit1c34ca53c74d2086a0800fc7d3db668976e1f7dc
tree1d322dbb8c8223db836ddf9bdb75cfea859a1519
parent4e3b96ee746ee0670f40602e2d7def29cd9dea64
Fixing errors reported by Klocwork tool

Error Report from Klocwork

1)FUNCRET.GEN: Non-void function does not return value :
 C and C++ : gen_sec_bin.cpp : Critical (1) : Analyze : Local

2)NPD.CHECK.MIGHT: Pointer 'fps' checked for NULL at line 123
 may be dereferenced at line 132. : C and C++ : gen_sec_bin.cpp :
 Critical (1) : Analyze : Local

3)NPD.FUNC.MIGHT: Pointer 'fps' returned from call to function 'fopen'
 at line 123 may be NULL and may be dereferenced at line 132. :
 C and C++ : gen_sec_bin.cpp : Critical (1) : Analyze : Local

4)UNINIT.STACK.ARRAY.MIGHT: 'payload' array elements might be used
 uninitialized in this function. : C and C++ : ocserverbasicops.cpp :
 Critical (1) : Analyze : Local

Change-Id: I970bc060191caf17b102b165bbe5656b079ad063
Signed-off-by: Sachin Agrawal <sachin.agrawal@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/374
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Joseph Morrow <joseph.l.morrow@intel.com>
Reviewed-by: Patrick Lankswert <patrick.lankswert@intel.com>
resource/csdk/stack/samples/linux/secure/gen_sec_bin.cpp
resource/csdk/stack/samples/linux/secure/ocserverbasicops.cpp