diff options
| author | Chia-I Wu <olv@lunarg.com> | 2014-12-16 00:36:58 +0800 |
|---|---|---|
| committer | Chia-I Wu <olv@lunarg.com> | 2014-12-17 11:01:45 +0800 |
| commit | e58076bff45e8a320638ac1746803f196322151c (patch) | |
| tree | 37ab2cbd77c14c3217fe7342aef00604c0dcc91c | |
| parent | fb8fd01a25c71c666e9b0149ec4b41c8bc14d273 (diff) | |
| download | usermoji-e58076bff45e8a320638ac1746803f196322151c.tar.xz | |
layers: fix -Wunused-variable warnings
| -rw-r--r-- | layers/draw_state.c | 1 | ||||
| -rwxr-xr-x | xgl-helper.py | 6 | ||||
| -rwxr-xr-x | xgl-layer-generate.py | 4 |
3 files changed, 4 insertions, 7 deletions
diff --git a/layers/draw_state.c b/layers/draw_state.c index 9ff8e2c6..7aac33bc 100644 --- a/layers/draw_state.c +++ b/layers/draw_state.c @@ -589,7 +589,6 @@ static void dsDumpDot(FILE* pOutFile) const int i = 0; // hard-coding to just the first DS index for now uint32_t skipUnusedCount = 0; // track consecutive unused slots for minimal reporting DS_LL_HEAD *pDS = getDS(lastBoundDS[i]); - XGL_UINT slotOffset = lastBoundSlotOffset[i]; if (pDS) { fprintf(pOutFile, "subgraph DS_SLOTS\n{\nlabel=\"DS0 Slots\"\n"); // First create simple array node as central DS reference point diff --git a/xgl-helper.py b/xgl-helper.py index 93f296df..dd512ff7 100755 --- a/xgl-helper.py +++ b/xgl-helper.py @@ -504,7 +504,6 @@ class StructWrapperGen: sh_funcs.append(' char* extra_indent = (char*)malloc(strlen(prefix) + 3);\n') sh_funcs.append(' strcpy(extra_indent, " ");\n') sh_funcs.append(' strncat(extra_indent, prefix, strlen(prefix));\n') - sh_funcs.append(" char dummy_char = '\\0';\n") sh_funcs.append(' char* stp_strs[%i];\n' % num_stps) for index in range(num_stps): if (stp_list[index]['ptr']): @@ -527,7 +526,7 @@ class StructWrapperGen: else: sh_funcs.append(' snprintf(stp_strs[%i], len, " %%s%s (%%p)\\n%%s", prefix, (void*)pStruct->%s, tmpStr);\n' % (index, stp_list[index]['name'], stp_list[index]['name'])) sh_funcs.append(' }\n') - sh_funcs.append(" else\n stp_strs[%i] = &dummy_char;\n" % (index)) + sh_funcs.append(" else\n stp_strs[%i] = \"\";\n" % (index)) elif stp_list[index]['array']: # TODO : For now just printing first element of array sh_funcs.append(' tmpStr = %s(&pStruct->%s[0], extra_indent);\n' % (self._get_sh_func_name(stp_list[index]['type']), stp_list[index]['name'])) sh_funcs.append(' len = 256+strlen(tmpStr);\n') @@ -924,7 +923,6 @@ class GraphVizGen: if 0 != num_stps: gv_funcs.append(" char* tmpStr;\n") gv_funcs.append(" char nodeName[100];\n") - gv_funcs.append(" char dummy_char = '\\0';\n") gv_funcs.append(' char* stp_strs[%i];\n' % num_stps) for index in range(num_stps): if (stp_list[index]['ptr']): @@ -947,7 +945,7 @@ class GraphVizGen: gv_funcs.append(' stp_strs[%i] = (char*)malloc(256+strlen(tmpStr)+strlen(nodeName)+strlen(myNodeName));\n' % (index)) gv_funcs.append(' sprintf(stp_strs[%i], "%%s\\n\\"%%s\\":struct%i -> \\"%%s\\" [];\\n", tmpStr, myNodeName, nodeName);\n' % (index, index)) gv_funcs.append(' }\n') - gv_funcs.append(" else\n stp_strs[%i] = &dummy_char;\n" % (index)) + gv_funcs.append(" else\n stp_strs[%i] = \"\";\n" % (index)) elif stp_list[index]['array']: # TODO : For now just printing first element of array gv_funcs.append(' sprintf(nodeName, "%s_%%p", (void*)&pStruct->%s[0]);\n' % (stp_list[index]['name'], stp_list[index]['name'])) gv_funcs.append(' tmpStr = %s(&pStruct->%s[0], nodeName);\n' % (self._get_gv_func_name(stp_list[index]['type']), stp_list[index]['name'])) diff --git a/xgl-layer-generate.py b/xgl-layer-generate.py index 3b3fe700..ebb414ac 100755 --- a/xgl-layer-generate.py +++ b/xgl-layer-generate.py @@ -203,11 +203,11 @@ class Subcommand(object): file_mode = "a" if 'CreateDevice' in proto.name: file_mode = "w" - f_open = 'unsigned int tid = pthread_self();\n pthread_mutex_lock( &file_lock );\n pOutFile = fopen(outFileName, "%s");\n ' % (file_mode) + f_open = 'pthread_mutex_lock( &file_lock );\n pOutFile = fopen(outFileName, "%s");\n ' % (file_mode) log_func = 'fprintf(pOutFile, "t{%%u} xgl%s(' % proto.name f_close = '\n fclose(pOutFile);\n pthread_mutex_unlock( &file_lock );' else: - f_open = 'unsigned int tid = pthread_self();\n pthread_mutex_lock( &print_lock );\n ' + f_open = 'pthread_mutex_lock( &print_lock );\n ' log_func = 'printf("t{%%u} xgl%s(' % proto.name f_close = '\n pthread_mutex_unlock( &print_lock );' print_vals = ', getTIDIndex()' |
