mirror of
				https://github.com/GrapheneOS/hardened_malloc.git
				synced 2025-11-03 01:06:33 +01:00 
			
		
		
		
	Fix two warnings
This commit is contained in:
		
							parent
							
								
									001eb0687b
								
							
						
					
					
						commit
						dcd8902632
					
				
					 2 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -2,6 +2,7 @@
 | 
			
		|||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
#include "../test_util.h"
 | 
			
		||||
#include "../../util.h"
 | 
			
		||||
 | 
			
		||||
OPTNONE int main(void) {
 | 
			
		||||
    char *p = malloc(256 * 1024);
 | 
			
		||||
| 
						 | 
				
			
			@ -9,7 +10,7 @@ OPTNONE int main(void) {
 | 
			
		|||
        return 1;
 | 
			
		||||
    }
 | 
			
		||||
    free(p);
 | 
			
		||||
    char *q = malloc(256 * 1024);
 | 
			
		||||
    UNUSED char *q = malloc(256 * 1024);
 | 
			
		||||
    p[64 * 1024 + 1] = 'a';
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,6 +2,7 @@
 | 
			
		|||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
#include "../test_util.h"
 | 
			
		||||
#include "../../util.h"
 | 
			
		||||
 | 
			
		||||
OPTNONE int main(void) {
 | 
			
		||||
    char *p = malloc(128);
 | 
			
		||||
| 
						 | 
				
			
			@ -9,7 +10,7 @@ OPTNONE int main(void) {
 | 
			
		|||
        return 1;
 | 
			
		||||
    }
 | 
			
		||||
    free(p);
 | 
			
		||||
    char *q = malloc(128);
 | 
			
		||||
    UNUSED char *q = malloc(128);
 | 
			
		||||
 | 
			
		||||
    p[65] = 'a';
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue