Просмотр исходного кода

libavutil/ppc: defines involving bit shifts should be unsigned

Otherwise, these can overflow at the boundaries of the integer type.

Signed-off-by: Brad Smith <brad@comstyle.com>
Sean McGovern 4 месяцев назад
Родитель
Сommit
c325f9c619
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      libavutil/ppc/cpu.c

+ 3 - 3
libavutil/ppc/cpu.c

@@ -53,9 +53,9 @@
 #define AT_HWCAP2            26
 #define AT_HWCAP2            26
 #endif
 #endif
 
 
-#define HWCAP_PPC_VSX        (1 << 7)
-#define HWCAP_PPC_ALTIVEC    (1 << 28)
-#define HWCAP2_PPC_ARCH_2_07 (1 << 31)
+#define HWCAP_PPC_VSX        (1U << 7)
+#define HWCAP_PPC_ALTIVEC    (1U << 28)
+#define HWCAP2_PPC_ARCH_2_07 (1U << 31)
 
 
 /**
 /**
  * This function MAY rely on signal() or fork() in order to make sure AltiVec
  * This function MAY rely on signal() or fork() in order to make sure AltiVec