• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修订版2a193e9df82917eaf440a20f99a3febe91dcb5fe (tree)
时间2022-11-12 17:50:04
作者Jakub Jelinek <jakub@redh...>
CommiterJakub Jelinek

Log Message

libgomp: Fix up build on mingw [PR107641]

Pointers should be first casted to intptr_t/uintptr_t before casting
them to another integral type to avoid warnings.
Furthermore, the function has code like

else if (upper <= UINT_MAX)
something;
else
something_else;

so it seems using unsigned type for upper where upper <= UINT_MAX is always
true is not intended.

2022-11-12 Jakub Jelinek <jakub@redhat.com>

PR libgomp/107641
* env.c (parse_unsigned_long): Cast params[2] to uintptr_t rather than
unsigned long. Change type of upper from unsigned to unsigned long.

更改概述

差异

--- a/libgomp/env.c
+++ b/libgomp/env.c
@@ -283,7 +283,7 @@ parse_unsigned_long_1 (const char *env, const char *val, unsigned long *pvalue,
283283 static bool
284284 parse_unsigned_long (const char *env, const char *val, void *const params[])
285285 {
286- unsigned upper = (unsigned long) params[2];
286+ unsigned long upper = (uintptr_t) params[2];
287287 unsigned long pvalue = 0;
288288 bool ret = parse_unsigned_long_1 (env, val, &pvalue, (bool) params[1]);
289289 if (!ret)