[Openmp-commits] [openmp] 2e3c6c3 - [OpenMP][NFC] Eliminate warning

Johannes Doerfert via Openmp-commits openmp-commits at lists.llvm.org
Thu May 18 13:28:12 PDT 2023


Author: Johannes Doerfert
Date: 2023-05-18T13:27:43-07:00
New Revision: 2e3c6c3f80ee3a573491947a08050d00a434a5d6

URL: https://github.com/llvm/llvm-project/commit/2e3c6c3f80ee3a573491947a08050d00a434a5d6
DIFF: https://github.com/llvm/llvm-project/commit/2e3c6c3f80ee3a573491947a08050d00a434a5d6.diff

LOG: [OpenMP][NFC] Eliminate warning

Added: 
    

Modified: 
    openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
index da8e318cf4c7d..21436baecf9da 100644
--- a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
+++ b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
@@ -2110,7 +2110,7 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
   /// Print information about the device.
   Error obtainInfoImpl(InfoQueueTy &Info) override {
     char TmpChar[1000];
-    const char *TmpCharPtr;
+    const char *TmpCharPtr = "Unknown";
     uint16_t Major, Minor;
     uint32_t TmpUInt, TmpUInt2;
     uint32_t CacheSize[4];
@@ -2153,8 +2153,6 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
       case HSA_DEVICE_TYPE_DSP:
         TmpCharPtr = "DSP";
         break;
-      default:
-        TmpCharPtr = "Unknown";
       }
       Info.add("Device Type", TmpCharPtr);
     }


        


More information about the Openmp-commits mailing list