diff options
| author | Chia-I Wu <olv@lunarg.com> | 2014-12-16 11:02:06 +0800 |
|---|---|---|
| committer | Chia-I Wu <olv@lunarg.com> | 2014-12-17 11:01:45 +0800 |
| commit | fb8fd01a25c71c666e9b0149ec4b41c8bc14d273 (patch) | |
| tree | 731fc894efd4e1fd9854b6d97a1c20213a4d3eec | |
| parent | 4b465ac5e0b6e18bc9edc67a06a82f998d1ccc94 (diff) | |
| download | usermoji-fb8fd01a25c71c666e9b0149ec4b41c8bc14d273.tar.xz | |
layers: fix -Wunused-function warnings
| -rwxr-xr-x | xgl-helper.py | 2 | ||||
| -rwxr-xr-x | xgl-layer-generate.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/xgl-helper.py b/xgl-helper.py index ef958e74..93f296df 100755 --- a/xgl-helper.py +++ b/xgl-helper.py @@ -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)) diff --git a/xgl-layer-generate.py b/xgl-layer-generate.py index 08e14293..3b3fe700 100755 --- a/xgl-layer-generate.py +++ b/xgl-layer-generate.py @@ -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) {') |
