mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-11-03 09:01:42 -05:00 
			
		
		
		
	scanner: add missing attributes
These allow better checking by the compiler. Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
This commit is contained in:
		
							parent
							
								
									0c532fa783
								
							
						
					
					
						commit
						cd5b4bcca7
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -380,7 +380,7 @@ desc_dump(char *desc, const char *fmt, ...)
 | 
				
			||||||
	putchar('\n');
 | 
						putchar('\n');
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void __attribute__ ((noreturn))
 | 
					static void __attribute__((format(printf, 2, 3), noreturn))
 | 
				
			||||||
fail(struct location *loc, const char *msg, ...)
 | 
					fail(struct location *loc, const char *msg, ...)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	va_list ap;
 | 
						va_list ap;
 | 
				
			||||||
| 
						 | 
					@ -394,7 +394,7 @@ fail(struct location *loc, const char *msg, ...)
 | 
				
			||||||
	exit(EXIT_FAILURE);
 | 
						exit(EXIT_FAILURE);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void __attribute__((format(printf, 2, 3)))
 | 
				
			||||||
warn(struct location *loc, const char *msg, ...)
 | 
					warn(struct location *loc, const char *msg, ...)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	va_list ap;
 | 
						va_list ap;
 | 
				
			||||||
| 
						 | 
					@ -836,7 +836,7 @@ start_element(void *data, const char *element_name, const char **atts)
 | 
				
			||||||
		switch (arg->type) {
 | 
							switch (arg->type) {
 | 
				
			||||||
		case NEW_ID:
 | 
							case NEW_ID:
 | 
				
			||||||
			ctx->message->new_id_count++;
 | 
								ctx->message->new_id_count++;
 | 
				
			||||||
			/* fallthrough */
 | 
								__attribute__((fallthrough));
 | 
				
			||||||
		case OBJECT:
 | 
							case OBJECT:
 | 
				
			||||||
			if (interface_name) {
 | 
								if (interface_name) {
 | 
				
			||||||
				validate_identifier(&ctx->loc,
 | 
									validate_identifier(&ctx->loc,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue