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>