Remove semicolon from error macros
This commit is contained in:
		
							parent
							
								
									f76d160c69
								
							
						
					
					
						commit
						0a9530dc6d
					
				@ -15,12 +15,12 @@ void vdie(const char *func, const char *errstr, ...);
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/* clang-format off */
 | 
					/* clang-format off */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define rerr(...) fprintf(stderr, __VA_ARGS__);
 | 
					#define rerr(...) fprintf(stderr, __VA_ARGS__)
 | 
				
			||||||
#define err(...) verr(__func__, __VA_ARGS__);
 | 
					#define err(...) verr(__func__, __VA_ARGS__)
 | 
				
			||||||
#define die(...) vdie(__func__, __VA_ARGS__);
 | 
					#define die(...) vdie(__func__, __VA_ARGS__)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef ENABLE_DEBUG
 | 
					#ifdef ENABLE_DEBUG
 | 
				
			||||||
# define dbg(...) verr(__func__, __VA_ARGS__);
 | 
					# define dbg(...) verr(__func__, __VA_ARGS__)
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
# define dbg(...)
 | 
					# define dbg(...)
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
				
			|||||||
@ -23,7 +23,7 @@ pre_thread_execute(struct emu *emu, struct thread *th)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	if (cpu == NULL) {
 | 
						if (cpu == NULL) {
 | 
				
			||||||
		err("cannot find CPU with phyid %d in loom %s",
 | 
							err("cannot find CPU with phyid %d in loom %s",
 | 
				
			||||||
				cpuid, emu->loom->id)
 | 
									cpuid, emu->loom->id);
 | 
				
			||||||
		return -1;
 | 
							return -1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -31,7 +31,6 @@ main(int argc, char *argv[])
 | 
				
			|||||||
		/* continue to close the trace files */
 | 
							/* continue to close the trace files */
 | 
				
			||||||
		err("emulation aborts!");
 | 
							err("emulation aborts!");
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		err("emulation ends");
 | 
					 | 
				
			||||||
		ret = 0;
 | 
							ret = 0;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -40,6 +39,11 @@ main(int argc, char *argv[])
 | 
				
			|||||||
		ret = 1;
 | 
							ret = 1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (ret == 0)
 | 
				
			||||||
 | 
							err("emulation ends ok");
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
							err("emulation ends with errors");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	free(emu);
 | 
						free(emu);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return ret;
 | 
						return ret;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user