[Openmp-commits] [openmp] 3fc97f9 - [OpenMP][Tests] NFC use type macro in printf

Joachim Protze via Openmp-commits openmp-commits at lists.llvm.org
Sun Jul 5 00:17:48 PDT 2020


Author: Joachim Protze
Date: 2020-07-05T09:17:18+02:00
New Revision: 3fc97f9636ba2d7323f61ec3dea431fb1f850f03

URL: https://github.com/llvm/llvm-project/commit/3fc97f9636ba2d7323f61ec3dea431fb1f850f03
DIFF: https://github.com/llvm/llvm-project/commit/3fc97f9636ba2d7323f61ec3dea431fb1f850f03.diff

LOG: [OpenMP][Tests] NFC use type macro in printf

Added: 
    

Modified: 
    openmp/runtime/test/ompt/callback.h

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/test/ompt/callback.h b/openmp/runtime/test/ompt/callback.h
index 3975ed9d1e10..6b756b8a75a1 100644
--- a/openmp/runtime/test/ompt/callback.h
+++ b/openmp/runtime/test/ompt/callback.h
@@ -22,22 +22,19 @@
 #define _OMPT_TESTS
 #endif
 
-static const char* ompt_thread_t_values[] = {
-  NULL,
-  "ompt_thread_initial",
-  "ompt_thread_worker",
-  "ompt_thread_other"
-};
+static const char *ompt_thread_t_values[] = {
+    "ompt_thread_UNDEFINED", "ompt_thread_initial", "ompt_thread_worker",
+    "ompt_thread_other"};
 
-static const char* ompt_task_status_t_values[] = {
-  NULL,
-  "ompt_task_complete",       // 1
-  "ompt_task_yield",          // 2
-  "ompt_task_cancel",         // 3
-  "ompt_task_detach",         // 4
-  "ompt_task_early_fulfill",  // 5
-  "ompt_task_late_fulfill",   // 6
-  "ompt_task_switch"          // 7
+static const char *ompt_task_status_t_values[] = {
+    "ompt_task_UNDEFINED",
+    "ompt_task_complete", // 1
+    "ompt_task_yield", // 2
+    "ompt_task_cancel", // 3
+    "ompt_task_detach", // 4
+    "ompt_task_early_fulfill", // 5
+    "ompt_task_late_fulfill", // 6
+    "ompt_task_switch" // 7
 };
 static const char* ompt_cancel_flag_t_values[] = {
   "ompt_cancel_parallel",
@@ -50,7 +47,7 @@ static const char* ompt_cancel_flag_t_values[] = {
 };
 
 static const char *ompt_dependence_type_t_values[] = {
-    NULL,
+    "ompt_dependence_type_UNDEFINED",
     "ompt_dependence_type_in", // 1
     "ompt_dependence_type_out", // 2
     "ompt_dependence_type_inout", // 3
@@ -990,7 +987,7 @@ on_ompt_callback_dependences(
     if (deps[i].dependence_type == ompt_dependence_type_source ||
         deps[i].dependence_type == ompt_dependence_type_sink)
       progress +=
-          sprintf(progress, "(%ld, %s), ", deps[i].variable.value,
+          sprintf(progress, "(%" PRIu64 ", %s), ", deps[i].variable.value,
                   ompt_dependence_type_t_values[deps[i].dependence_type]);
     else
       progress +=


        


More information about the Openmp-commits mailing list