mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-11-03 09:01:42 -05:00 
			
		
		
		
	Check arguments to wl_resource_post_error in gcc
The attached patch turns on printf argument warnings for this function, which I found was being called incorrectly at least once in the wayland source code.
This commit is contained in:
		
							parent
							
								
									ecfb79bd71
								
							
						
					
					
						commit
						81ffaa04b9
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -262,7 +262,8 @@ void wl_resource_queue_event(struct wl_resource *resource,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* msg is a printf format string, variable args are its args. */
 | 
					/* msg is a printf format string, variable args are its args. */
 | 
				
			||||||
void wl_resource_post_error(struct wl_resource *resource,
 | 
					void wl_resource_post_error(struct wl_resource *resource,
 | 
				
			||||||
			    uint32_t code, const char *msg, ...);
 | 
								    uint32_t code, const char *msg, ...)
 | 
				
			||||||
 | 
						__attribute__ ((format (printf, 3, 4)));
 | 
				
			||||||
void wl_resource_post_no_memory(struct wl_resource *resource);
 | 
					void wl_resource_post_no_memory(struct wl_resource *resource);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "wayland-server-protocol.h"
 | 
					#include "wayland-server-protocol.h"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue