Bläddra i källkod

added casts in vtable generation to remove the warnings

Leon Urbas 11 år sedan
förälder
incheckning
a7687908a6
3 ändrade filer med 4 tillägg och 4 borttagningar
  1. 2 2
      tool/generate_builtin.py
  2. 1 1
      tool/generate_namespace.py
  3. 1 1
      tool/opcua_basictypes.h

+ 2 - 2
tool/generate_builtin.py

@@ -8,12 +8,12 @@ if len(sys.argv) != 3:
     print("Usage: python generate_builtin.py <path/to/Opc.Ua.Types.bsd> <outfile w/o extension>", file=sys.stdout)
     exit(0)
 
-# types that are coded manually
+# types that are coded manually 
 exclude_types = set(["Boolean", "SByte", "Byte", "Int16", "UInt16", "Int32", "UInt32",
                     "Int64", "UInt64", "Float", "Double", "String", "DateTime", "Guid",
                     "ByteString", "XmlElement", "NodeId", "ExpandedNodeId", "StatusCode", 
                     "QualifiedName", "LocalizedText", "ExtensionObject", "DataValue",
-                     "Variant", "DiagnosticInfo", "RequestHeader", "ResponseHeader", "NodeIdType"])
+                     "Variant", "DiagnosticInfo", "NodeIdType"])
 
 elementary_size = dict()
 elementary_size["Boolean"] = 1;

+ 1 - 1
tool/generate_namespace.py

@@ -67,7 +67,7 @@ for row in rows2:
     name = "UA_" + row[0]
     print('#define '+name.upper()+'_NS0 (UA_namespace_zero['+name.upper()+'].Id)', file=fh)
 
-    print("\t{" + row[1] + ", &" + name + "_calcSize, &" + name + "_decode, &" + name + "_encode},",end='\n',file=fc) 
+    print("\t{" + row[1] + ", (Int32(*)(void const*)) " + name + "_calcSize, (Int32(*)(char const*,Int32*,void*)) " + name + "_decode, (Int32(*)(void const*,Int32*,char*))" + name + "_encode},",end='\n',file=fc) 
 
 print("\t{0,UA_NULL,UA_NULL,UA_NULL}\n};",file=fc)
 print('#endif /* OPCUA_NAMESPACE_0_H_ */', end='\n', file=fh)

+ 1 - 1
tool/opcua_basictypes.h

@@ -37,7 +37,7 @@ typedef double Double;
 #define UA_FALSE (!UA_TRUE)
 #define FALSE UA_FALSE
 #define UA_NULL ((void*)0)
-#define NULL UA_NULL
+// #define NULL UA_NULL
 
 #define UA_TYPE_METHOD_PROTOTYPES(TYPE) \
 Int32 TYPE##_calcSize(TYPE const * ptr);\