Browse Source

* fixing check_builtin.c -> an extension object was initalized with garbage
* adding debug symbolds to CMake config
relates to #113

Stasik0 10 years ago
parent
commit
ec231f2f05
2 changed files with 2 additions and 1 deletions
  1. 1 1
      CMakeLists.txt
  2. 1 0
      tests/check_builtin.c

+ 1 - 1
CMakeLists.txt

@@ -11,7 +11,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules")
 
 # compiler options
 if(CMAKE_COMPILER_IS_GNUCC)
-add_definitions(-std=c99 -pedantic -pipe -fstack-protector -Wall -Wextra
+add_definitions(-std=c99 -g -pedantic -pipe -fstack-protector -Wall -Wextra
                  -Wno-unused-parameter -Wno-unused-function -Wno-unused-label
                  -Wpointer-arith -Wformat -Wreturn-type -Wsign-compare -Wmultichar
                  -Wformat-nonliteral -Winit-self -Wuninitialized -Wno-deprecated

+ 1 - 0
tests/check_builtin.c

@@ -214,6 +214,7 @@ START_TEST(UA_ExtensionObject_calcSizeShallWorkOnExample) {
 
 	// empty ExtensionObject, handcoded
 	// when
+	UA_ExtensionObject_init(&extensionObject);
 	extensionObject.typeId.nodeIdType = UA_NODEIDTYPE_NUMERIC;
 	extensionObject.typeId.identifier.numeric = 0;
 	extensionObject.encoding = UA_EXTENSIONOBJECT_ENCODINGMASK_NOBODYISENCODED;