mirror of
				https://git.tukaani.org/xz.git
				synced 2025-10-29 20:42:58 +00:00 
			
		
		
		
	Tests: Silence -Wsign-conversion warning on GCC version < 10.
Since GCC version 10, GCC no longer complains about simple implicit
integer conversions with Arithmetic operators.
For instance:
    uint8_t a = 5;
    uint32_t b = a + 5;
Give a warning on GCC 9 and earlier but this:
    uint8_t a = 5;
    uint32_t b = (a + 5) * 2;
Gives a warning with GCC 10+.
			
			
This commit is contained in:
		
							parent
							
								
									932f02990c
								
							
						
					
					
						commit
						3f51a4415a
					
				| @ -320,7 +320,7 @@ test_lzma_block_header_encode(void) | ||||
| 	uint8_t flags = out[1]; | ||||
| 
 | ||||
| 	// Should have number of filters = 1
 | ||||
| 	assert_uint_eq((flags & 0x3) + 1, 1); | ||||
| 	assert_uint_eq((flags & 0x3) + 1U, 1); | ||||
| 
 | ||||
| 	// Bits 2-7 must be empty not set
 | ||||
| 	assert_uint_eq(flags & (0xFF - 0x3), 0); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user