mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Fix up some printflike attributes.
This commit is contained in:
		@@ -386,7 +386,7 @@ control_pause_pane(struct client *c, struct window_pane *wp)
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Write a line. */
 | 
					/* Write a line. */
 | 
				
			||||||
static void
 | 
					static void printflike(2, 0)
 | 
				
			||||||
control_vwrite(struct client *c, const char *fmt, va_list ap)
 | 
					control_vwrite(struct client *c, const char *fmt, va_list ap)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct control_state	*cs = c->control_state;
 | 
						struct control_state	*cs = c->control_state;
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										5
									
								
								log.c
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								log.c
									
									
									
									
									
								
							@@ -30,9 +30,6 @@
 | 
				
			|||||||
static FILE	*log_file;
 | 
					static FILE	*log_file;
 | 
				
			||||||
static int	 log_level;
 | 
					static int	 log_level;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void	 log_event_cb(int, const char *);
 | 
					 | 
				
			||||||
static void	 log_vwrite(const char *, va_list);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/* Log callback for libevent. */
 | 
					/* Log callback for libevent. */
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
log_event_cb(__unused int severity, const char *msg)
 | 
					log_event_cb(__unused int severity, const char *msg)
 | 
				
			||||||
@@ -101,7 +98,7 @@ log_close(void)
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Write a log message. */
 | 
					/* Write a log message. */
 | 
				
			||||||
static void
 | 
					static void printflike(1, 0)
 | 
				
			||||||
log_vwrite(const char *msg, va_list ap)
 | 
					log_vwrite(const char *msg, va_list ap)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	char		*fmt, *out;
 | 
						char		*fmt, *out;
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										12
									
								
								tmux.h
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								tmux.h
									
									
									
									
									
								
							@@ -2342,7 +2342,7 @@ struct cmdq_item *cmdq_get_callback1(const char *, cmdq_cb, void *);
 | 
				
			|||||||
struct cmdq_item *cmdq_get_error(const char *);
 | 
					struct cmdq_item *cmdq_get_error(const char *);
 | 
				
			||||||
struct cmdq_item *cmdq_insert_after(struct cmdq_item *, struct cmdq_item *);
 | 
					struct cmdq_item *cmdq_insert_after(struct cmdq_item *, struct cmdq_item *);
 | 
				
			||||||
struct cmdq_item *cmdq_append(struct client *, struct cmdq_item *);
 | 
					struct cmdq_item *cmdq_append(struct client *, struct cmdq_item *);
 | 
				
			||||||
void		 cmdq_insert_hook(struct session *, struct cmdq_item *,
 | 
					void printflike(4, 5) cmdq_insert_hook(struct session *, struct cmdq_item *,
 | 
				
			||||||
		     struct cmd_find_state *, const char *, ...);
 | 
							     struct cmd_find_state *, const char *, ...);
 | 
				
			||||||
void		 cmdq_continue(struct cmdq_item *);
 | 
					void		 cmdq_continue(struct cmdq_item *);
 | 
				
			||||||
u_int		 cmdq_next(struct client *);
 | 
					u_int		 cmdq_next(struct client *);
 | 
				
			||||||
@@ -2398,7 +2398,7 @@ void	 file_fire_done(struct client_file *);
 | 
				
			|||||||
void	 file_fire_read(struct client_file *);
 | 
					void	 file_fire_read(struct client_file *);
 | 
				
			||||||
int	 file_can_print(struct client *);
 | 
					int	 file_can_print(struct client *);
 | 
				
			||||||
void printflike(2, 3) file_print(struct client *, const char *, ...);
 | 
					void printflike(2, 3) file_print(struct client *, const char *, ...);
 | 
				
			||||||
void	 file_vprint(struct client *, const char *, va_list);
 | 
					void printflike(2, 0) file_vprint(struct client *, const char *, va_list);
 | 
				
			||||||
void	 file_print_buffer(struct client *, void *, size_t);
 | 
					void	 file_print_buffer(struct client *, void *, size_t);
 | 
				
			||||||
void printflike(2, 3) file_error(struct client *, const char *, ...);
 | 
					void printflike(2, 3) file_error(struct client *, const char *, ...);
 | 
				
			||||||
void	 file_write(struct client *, const char *, int, const void *, size_t,
 | 
					void	 file_write(struct client *, const char *, int, const void *, size_t,
 | 
				
			||||||
@@ -2498,7 +2498,8 @@ struct style_range *status_get_range(struct client *, u_int, u_int);
 | 
				
			|||||||
void	 status_init(struct client *);
 | 
					void	 status_init(struct client *);
 | 
				
			||||||
void	 status_free(struct client *);
 | 
					void	 status_free(struct client *);
 | 
				
			||||||
int	 status_redraw(struct client *);
 | 
					int	 status_redraw(struct client *);
 | 
				
			||||||
void status_message_set(struct client *, int, int, int, const char *, ...);
 | 
					void printflike(5, 6) status_message_set(struct client *, int, int, int,
 | 
				
			||||||
 | 
						     const char *, ...);
 | 
				
			||||||
void	 status_message_clear(struct client *);
 | 
					void	 status_message_clear(struct client *);
 | 
				
			||||||
int	 status_message_redraw(struct client *);
 | 
					int	 status_message_redraw(struct client *);
 | 
				
			||||||
void	 status_prompt_set(struct client *, struct cmd_find_state *,
 | 
					void	 status_prompt_set(struct client *, struct cmd_find_state *,
 | 
				
			||||||
@@ -2653,7 +2654,7 @@ void printflike(3, 4) screen_write_puts(struct screen_write_ctx *,
 | 
				
			|||||||
	     const struct grid_cell *, const char *, ...);
 | 
						     const struct grid_cell *, const char *, ...);
 | 
				
			||||||
void printflike(4, 5) screen_write_nputs(struct screen_write_ctx *,
 | 
					void printflike(4, 5) screen_write_nputs(struct screen_write_ctx *,
 | 
				
			||||||
	     ssize_t, const struct grid_cell *, const char *, ...);
 | 
						     ssize_t, const struct grid_cell *, const char *, ...);
 | 
				
			||||||
void	 screen_write_vnputs(struct screen_write_ctx *, ssize_t,
 | 
					void printflike(4, 0) screen_write_vnputs(struct screen_write_ctx *, ssize_t,
 | 
				
			||||||
	     const struct grid_cell *, const char *, va_list);
 | 
						     const struct grid_cell *, const char *, va_list);
 | 
				
			||||||
void	 screen_write_putc(struct screen_write_ctx *, const struct grid_cell *,
 | 
					void	 screen_write_putc(struct screen_write_ctx *, const struct grid_cell *,
 | 
				
			||||||
	     u_char);
 | 
						     u_char);
 | 
				
			||||||
@@ -2922,7 +2923,8 @@ extern const struct window_mode window_client_mode;
 | 
				
			|||||||
extern const struct window_mode window_copy_mode;
 | 
					extern const struct window_mode window_copy_mode;
 | 
				
			||||||
extern const struct window_mode window_view_mode;
 | 
					extern const struct window_mode window_view_mode;
 | 
				
			||||||
void printflike(2, 3) window_copy_add(struct window_pane *, const char *, ...);
 | 
					void printflike(2, 3) window_copy_add(struct window_pane *, const char *, ...);
 | 
				
			||||||
void		 window_copy_vadd(struct window_pane *, const char *, va_list);
 | 
					void printflike(2, 0) window_copy_vadd(struct window_pane *, const char *,
 | 
				
			||||||
 | 
							     va_list);
 | 
				
			||||||
void		 window_copy_pageup(struct window_pane *, int);
 | 
					void		 window_copy_pageup(struct window_pane *, int);
 | 
				
			||||||
void		 window_copy_start_drag(struct client *, struct mouse_event *);
 | 
					void		 window_copy_start_drag(struct client *, struct mouse_event *);
 | 
				
			||||||
char		*window_copy_get_word(struct window_pane *, u_int, u_int);
 | 
					char		*window_copy_get_word(struct window_pane *, u_int, u_int);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -30,12 +30,14 @@ int	 xasprintf(char **, const char *, ...)
 | 
				
			|||||||
		__attribute__((__format__ (printf, 2, 3)))
 | 
							__attribute__((__format__ (printf, 2, 3)))
 | 
				
			||||||
		__attribute__((__nonnull__ (2)));
 | 
							__attribute__((__nonnull__ (2)));
 | 
				
			||||||
int	 xvasprintf(char **, const char *, va_list)
 | 
					int	 xvasprintf(char **, const char *, va_list)
 | 
				
			||||||
 | 
							__attribute__((__format__ (printf, 2, 0)))
 | 
				
			||||||
		__attribute__((__nonnull__ (2)));
 | 
							__attribute__((__nonnull__ (2)));
 | 
				
			||||||
int	 xsnprintf(char *, size_t, const char *, ...)
 | 
					int	 xsnprintf(char *, size_t, const char *, ...)
 | 
				
			||||||
		__attribute__((__format__ (printf, 3, 4)))
 | 
							__attribute__((__format__ (printf, 3, 4)))
 | 
				
			||||||
		__attribute__((__nonnull__ (3)))
 | 
							__attribute__((__nonnull__ (3)))
 | 
				
			||||||
		__attribute__((__bounded__ (__string__, 1, 2)));
 | 
							__attribute__((__bounded__ (__string__, 1, 2)));
 | 
				
			||||||
int	 xvsnprintf(char *, size_t, const char *, va_list)
 | 
					int	 xvsnprintf(char *, size_t, const char *, va_list)
 | 
				
			||||||
 | 
							__attribute__((__format__ (printf, 3, 0)))
 | 
				
			||||||
		__attribute__((__nonnull__ (3)))
 | 
							__attribute__((__nonnull__ (3)))
 | 
				
			||||||
		__attribute__((__bounded__ (__string__, 1, 2)));
 | 
							__attribute__((__bounded__ (__string__, 1, 2)));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user