Skip to content
Commit aff985fd authored by Stafford Horne's avatar Stafford Horne Committed by Shuah Khan
Browse files

selftests/intel_pstate: Fix warning on loop index overflow



The build was showing the warning:
 aperf.c:60:27: warning: iteration 2147483647 invokes undefined behavior
 [-Waggressive-loop-optimizations]
  for (i=0; i<0x8fffffff; i++) {

This change sets i, cpu and fd to unsigned int as they should not need
to be signed.

Cc: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
parent 4da39ceb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment