ソースを参照

Kernel: Align the KResult value storage appropriately.

We should figure out how to convert this code to using AK::Result.
Andreas Kling 6 年 前
コミット
ae4d707684
1 ファイル変更1 行追加1 行削除
  1. 1 1
      Kernel/KResult.h

+ 1 - 1
Kernel/KResult.h

@@ -94,7 +94,7 @@ public:
     }
 
 private:
-    char m_storage[sizeof(T)] __attribute__((aligned(sizeof(T))));
+    alignas (T) char m_storage[sizeof(T)];
     KResult m_error;
     bool m_is_error { false };
 };