[Add] Using -Wpointer-arith flag.
This commit is contained in:
		
							parent
							
								
									14fed140c3
								
							
						
					
					
						commit
						5eff5317c6
					
				| @ -29,7 +29,7 @@ ifeq ($(OS),LINUX) | ||||
| 	CFLAGS += -D_POSIX_SOURCE | ||||
| endif | ||||
| ifdef DEBUG | ||||
| CFLAGS += -W -Wall -Wextra -Wmissing-prototypes -Winline -Wcast-align \
 | ||||
| CFLAGS += -W -Wall -Wextra -Wpointer-arith -Wmissing-prototypes -Winline -Wcast-align \
 | ||||
| 					-Wmissing-declarations -fno-inline -g3 -DDEBUG -DLUA_USE_APICHECK -std=c99 | ||||
| else | ||||
| CFLAGS += -O2 -funroll-loops -pipe -std=c99 | ||||
|  | ||||
| @ -382,6 +382,7 @@ long pack_tell(Packfile* file) { | ||||
| void* pack_readfile(const char* packfile, const char* filename, uint32_t* filesize) { | ||||
|   Packfile* file = (Packfile*)malloc(sizeof(Packfile)); | ||||
|   void* buf; | ||||
|   char* str; | ||||
|   int size, bytes; | ||||
| 
 | ||||
|   if(filesize) | ||||
| @ -409,7 +410,8 @@ void* pack_readfile(const char* packfile, const char* filename, uint32_t* filesi | ||||
|     return NULL; | ||||
|   } | ||||
|   DEBUG("Read %d bytes from '%s'", bytes, filename); | ||||
|   memset(buf+size, 0, 1); /* Append size '\0' for it to validate as a string. */ | ||||
|   str = buf; | ||||
|   str[size] = '\0'; /* Append size '\0' for it to validate as a string. */ | ||||
| 
 | ||||
|   /* Check the md5. */ | ||||
|   md5_state_t md5; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Allanis
						Allanis