mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-20 12:52:55 +00:00
test/gem_userptr_*: Fix compile fail
Also shut up warnings. Those revealed incorrect usage of local variables in conjunction with igt_fixture/igt_subtest. Since those use longjmps we need to move the out of the stackframe those magic blocks are declared in. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
@@ -42,8 +42,11 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/mman.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "drm.h"
|
||||
#include "i915_drm.h"
|
||||
|
||||
#include "drmtest.h"
|
||||
#include "intel_bufmgr.h"
|
||||
#include "intel_batchbuffer.h"
|
||||
@@ -288,7 +291,6 @@ static void test_ptr_read(void *ptr)
|
||||
unsigned long iter = 0;
|
||||
volatile unsigned long *p;
|
||||
unsigned long i, loops;
|
||||
register unsigned long v;
|
||||
|
||||
loops = BO_SIZE / sizeof(unsigned long) / 4;
|
||||
|
||||
@@ -297,10 +299,10 @@ static void test_ptr_read(void *ptr)
|
||||
while (run_test) {
|
||||
p = (unsigned long *)ptr;
|
||||
for (i = 0; i < loops; i++) {
|
||||
v = *p++;
|
||||
v = *p++;
|
||||
v = *p++;
|
||||
v = *p++;
|
||||
(void)*p++;
|
||||
(void)*p++;
|
||||
(void)*p++;
|
||||
(void)*p++;
|
||||
}
|
||||
iter++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user