clangupc / clang-upc

Clang UPC Front-End
https://clangupc.github.io/
Other
16 stars 5 forks source link

portability nit in runtime (width of pid_t). #55

Closed PHHargrove closed 10 years ago

PHHargrove commented 10 years ago

From a build (still not functional) of the UPC runtime on Solaris:

/home/phargrov/llvm-upc/src/llvm/tools/clang/runtime/libupc/smp/upc_backtrace.c:239:38: warning: format specifies type 'int' but the argument has type 'pid_t' (aka 'long') [-Wformat]
              sprintf(pid_buf, "%d", getpid());
                                ~~   ^~~~~~~~
                                %ld
/home/phargrov/llvm-upc/src/llvm/tools/clang/runtime/libupc/smp/upc_backtrace.c:306:41: warning: format specifies type 'int' but the argument has type 'pid_t' (aka 'long') [-Wformat]
          fprintf (stderr, "   %4d   %d\n", i, __upc_info->thread_info[i].pid);
                                     ~~        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                     %ld
2 warnings generated.