mirror of
				https://github.com/tiagovignatti/intel-gpu-tools.git
				synced 2025-11-04 03:58:27 +00:00 
			
		
		
		
	tests/gem_pwrite_snooped: Fix use of GCC pragmas
Apparently GCC treats the #pragma directive as a code block and so we
returned unconditionally from memchr_inv() on the first byte fubaring
the test.
commit b04691b3e8e62bd105f0f4d8d3b9e7da187f0c90
Author: Thomas Wood <thomas.wood@intel.com>
Date:   Tue Sep 8 11:16:46 2015 +0100
    tests/gem_pwrite_snooped: disable const cast warning
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92227
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
			
			
This commit is contained in:
		
							parent
							
								
									0ab76a22d1
								
							
						
					
					
						commit
						e3ac13e16a
					
				@ -78,17 +78,17 @@ static void blit(drm_intel_bo *dst, drm_intel_bo *src,
 | 
			
		||||
 | 
			
		||||
static void *memchr_inv(const void *s, int c, size_t n)
 | 
			
		||||
{
 | 
			
		||||
	const unsigned char *us = s;
 | 
			
		||||
	unsigned char uc = c;
 | 
			
		||||
	const uint8_t *us = s;
 | 
			
		||||
	const uint8_t uc = c;
 | 
			
		||||
 | 
			
		||||
	while (n--) {
 | 
			
		||||
		if (*us != uc)
 | 
			
		||||
#pragma GCC diagnostic push
 | 
			
		||||
#pragma GCC diagnostic ignored "-Wcast-qual"
 | 
			
		||||
	while (n--) {
 | 
			
		||||
		if (*us != uc)
 | 
			
		||||
			return (void *) us;
 | 
			
		||||
#pragma GCC diagnostic pop
 | 
			
		||||
		us++;
 | 
			
		||||
	}
 | 
			
		||||
#pragma GCC diagnostic pop
 | 
			
		||||
 | 
			
		||||
	return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user