summaryrefslogtreecommitdiff
path: root/src/cuda-sim/ptx_loader.cc
diff options
context:
space:
mode:
authorAhmad Alawneh <[email protected]>2023-06-12 17:31:05 -0400
committerGitHub <[email protected]>2023-06-12 17:31:05 -0400
commitb471b3481b2399222ffd9ee0f007628834e68767 (patch)
tree267f112f3608ce7f4caa898250a3eb24a90814b6 /src/cuda-sim/ptx_loader.cc
parent73db3f79467cb918c6ac11796268e2492c69b101 (diff)
fixing bunch of formatting warnings (#53)
* fixing bunch of formating warrnings * remove unintialized and unused results warnnings * revert the changes , as it doenst fix the warning --------- Co-authored-by: Fangjia Shen <[email protected]>
Diffstat (limited to 'src/cuda-sim/ptx_loader.cc')
-rw-r--r--src/cuda-sim/ptx_loader.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cuda-sim/ptx_loader.cc b/src/cuda-sim/ptx_loader.cc
index 4e91763..df35498 100644
--- a/src/cuda-sim/ptx_loader.cc
+++ b/src/cuda-sim/ptx_loader.cc
@@ -95,7 +95,7 @@ void gpgpu_context::print_ptx_file(const char *p, unsigned source_num,
const ptx_instruction *pI = ptx_parser->ptx_instruction_lookup(filename, n);
char pc[64];
if (pI && pI->get_PC())
- snprintf(pc, 64, "%4u", pI->get_PC());
+ snprintf(pc, 64, "%4llu", pI->get_PC());
else
snprintf(pc, 64, " ");
printf(" _%u.ptx %4u (pc=%s): %s\n", source_num, n, pc, t);
@@ -240,7 +240,7 @@ void fix_duplicate_errors(char fname2[1024]) {
unsigned oldlinenum = 1;
unsigned linenum;
char *startptr = ptxdata;
- char *funcptr;
+ char *funcptr = NULL;
char *tempptr = ptxdata - 1;
char *lineptr = ptxdata - 1;
@@ -320,7 +320,7 @@ void fix_duplicate_errors(char fname2[1024]) {
// we need the application name here too.
char *get_app_binary_name() {
char exe_path[1025];
- char *self_exe_path;
+ char *self_exe_path = NULL;
#ifdef __APPLE__
// AMRUTH: get apple device and check the result.
printf("WARNING: not tested for Apple-mac devices \n");