layers: fix -Wunused-function warnings
authorChia-I Wu <olv@lunarg.com>
Tue, 16 Dec 2014 03:02:06 +0000 (11:02 +0800)
committerChia-I Wu <olv@lunarg.com>
Wed, 17 Dec 2014 03:01:45 +0000 (11:01 +0800)
xgl-helper.py
xgl-layer-generate.py

index ef958e7400524b43929bcc434d550c61db06fe20..93f296dfe275aca52be9585253c1c5e175e98711 100755 (executable)
@@ -776,7 +776,7 @@ class EnumCodeGen:
             # bet == base_enum_type, fet == final_enum_type
         for bet in self.et_dict:
             fet = self.tf_dict[bet]
-            body.append("static const char* string_%s(%s input_value)\n{\n    switch ((%s)input_value)\n    {\n" % (fet, fet, fet))
+            body.append("static inline const char* string_%s(%s input_value)\n{\n    switch ((%s)input_value)\n    {\n" % (fet, fet, fet))
             for e in sorted(self.et_dict[bet]):
                 if (self.ev_dict[e]['unique']):
                     body.append('    case %s:\n        return "%s";\n' % (e, e))
index 08e1429314e47acf6eeca7967bec992e1b2ee10f..3b3fe700180c6270f50d65b44202bb4b8778ea09 100755 (executable)
@@ -1790,7 +1790,7 @@ class ObjectTrackerSubcommand(Subcommand):
         header_txt.append('    numObjs[objType]++;')
         header_txt.append('    numTotalObjs++;')
         header_txt.append('    //sprintf(str, "OBJ_STAT : %lu total objs & %lu %s objs.", numTotalObjs, numObjs[objType], string_XGL_OBJECT_TYPE(objType));')
-        header_txt.append('    //ll_print_lists();')
+        header_txt.append('    if (0) ll_print_lists();')
         header_txt.append('}')
         header_txt.append('// Traverse global list and return type for given object')
         header_txt.append('static XGL_OBJECT_TYPE ll_get_obj_type(XGL_OBJECT object) {')
@@ -1805,6 +1805,7 @@ class ObjectTrackerSubcommand(Subcommand):
         header_txt.append('    layerCbMsg(XGL_DBG_MSG_ERROR, XGL_VALIDATION_LEVEL_0, object, 0, OBJTRACK_MISSING_OBJECT, "OBJTRACK", str);')
         header_txt.append('    return XGL_OBJECT_TYPE_UNKNOWN;')
         header_txt.append('}')
+        header_txt.append('#if 0')
         header_txt.append('static uint64_t ll_get_obj_uses(XGL_VOID* pObj, XGL_OBJECT_TYPE objType) {')
         header_txt.append('    objNode *pTrav = pObjectHead[objType];')
         header_txt.append('    while (pTrav) {')
@@ -1815,6 +1816,7 @@ class ObjectTrackerSubcommand(Subcommand):
         header_txt.append('    }')
         header_txt.append('    return 0;')
         header_txt.append('}')
+        header_txt.append('#endif')
         header_txt.append('static void ll_increment_use_count(XGL_VOID* pObj, XGL_OBJECT_TYPE objType) {')
         header_txt.append('    objNode *pTrav = pObjectHead[objType];')
         header_txt.append('    while (pTrav) {')