diff options
| author | Mengchi Zhang <[email protected]> | 2019-06-12 19:55:35 -0400 |
|---|---|---|
| committer | Mengchi Zhang <[email protected]> | 2019-06-12 19:55:35 -0400 |
| commit | 632bdaab79b9c1fd51ef8152aa00209f76c03101 (patch) | |
| tree | 1bd10717e1cbb67a1610b73493f45eb9bd8d79d6 | |
| parent | e5447646aaca133f2cc5cbafcaf7aeef4b384c62 (diff) | |
Fix some compiler warning
Signed-off-by: Mengchi Zhang <[email protected]>
| -rw-r--r-- | src/cuda-sim/ptx_loader.h | 4 | ||||
| -rw-r--r-- | src/cuda-sim/ptx_parser.cc | 2 | ||||
| -rw-r--r-- | src/cuda-sim/ptx_parser.h | 9 |
3 files changed, 8 insertions, 7 deletions
diff --git a/src/cuda-sim/ptx_loader.h b/src/cuda-sim/ptx_loader.h index 3637bff..ee09e16 100644 --- a/src/cuda-sim/ptx_loader.h +++ b/src/cuda-sim/ptx_loader.h @@ -29,12 +29,12 @@ #define PTX_LOADER_H_INCLUDED #include <string> -#define LINEBUF_SIZE 1024 +#define PTXINFO_LINEBUF_SIZE 1024 typedef void * yyscan_t; class ptxinfo_data{ public: yyscan_t scanner; - char linebuf[LINEBUF_SIZE]; + char linebuf[PTXINFO_LINEBUF_SIZE]; unsigned col; const char *g_ptxinfo_filename; diff --git a/src/cuda-sim/ptx_parser.cc b/src/cuda-sim/ptx_parser.cc index a01d1e3..2872b84 100644 --- a/src/cuda-sim/ptx_parser.cc +++ b/src/cuda-sim/ptx_parser.cc @@ -63,9 +63,7 @@ std::map<std::string,symbol_table*> g_sym_name_to_symbol_table; fflush(stdout); \ } -static function_info *g_func_info = NULL; static std::map<unsigned,std::string> g_ptx_token_decode; -static operand_info g_return_var; const char *decode_token( int type ) { diff --git a/src/cuda-sim/ptx_parser.h b/src/cuda-sim/ptx_parser.h index c4e0b89..25c01fe 100644 --- a/src/cuda-sim/ptx_parser.h +++ b/src/cuda-sim/ptx_parser.h @@ -58,14 +58,15 @@ class ptx_recognizer { g_max_regs_per_thread = 0; g_global_symbol_table = NULL; g_current_symbol_table = NULL; - symbol *g_last_symbol = NULL; + g_last_symbol = NULL; g_error_detected = 0; g_entry_func_param_index=0; + g_func_info = NULL; } // global list yyscan_t scanner; -#define LINEBUF_SIZE (4*1024) - char linebuf[LINEBUF_SIZE]; +#define PTX_LINEBUF_SIZE (4*1024) + char linebuf[PTX_LINEBUF_SIZE]; unsigned col; int g_size; char *g_add_identifier_cached__identifier; @@ -100,6 +101,8 @@ class ptx_recognizer { std::list<ptx_instruction*> g_instructions; int g_error_detected; unsigned g_entry_func_param_index; + function_info *g_func_info; + operand_info g_return_var; // member function list void init_directive_state(); |
