xwin: winclipboard: fix missing prototypes / missing include
[324/383] Compiling C object hw/xwin/winclipboard/xwinclip.exe.p/debug.c.obj 666../hw/xwin/winclipboard/debug.c:31:1: warning: no previous prototype for ‘winDebug’ [-Wmissing-prototypes] 667 31 | winDebug(const char *format, ...) 668 | ^~~~~~~~ 669../hw/xwin/winclipboard/debug.c: In function ‘winDebug’: 670../hw/xwin/winclipboard/debug.c:37:3: warning: function ‘winDebug’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] 671 37 | count += vfprintf(stderr, format, ap); 672 | ^~~~~ 673../hw/xwin/winclipboard/debug.c: At top level: 674../hw/xwin/winclipboard/debug.c:44:1: warning: no previous prototype for ‘ErrorF’ [-Wmissing-prototypes] 675 44 | ErrorF(const char *format, ...) 676 | ^~~~~~ 677../hw/xwin/winclipboard/debug.c: In function ‘ErrorF’: 678../hw/xwin/winclipboard/debug.c:49:3: warning: function ‘ErrorF’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] 679 49 | count = vfprintf(stderr, format, ap); 680 | ^~~~~ Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1295>
This commit is contained in:
		
							parent
							
								
									b93c614176
								
							
						
					
					
						commit
						f855e35df2
					
				| 
						 | 
					@ -26,27 +26,21 @@
 | 
				
			||||||
#include <stdarg.h>
 | 
					#include <stdarg.h>
 | 
				
			||||||
#include <stdio.h>
 | 
					#include <stdio.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if 1
 | 
					#include "internal.h"
 | 
				
			||||||
int
 | 
					 | 
				
			||||||
winDebug(const char *format, ...)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
  int count;
 | 
					 | 
				
			||||||
  va_list ap;
 | 
					 | 
				
			||||||
  va_start(ap, format);
 | 
					 | 
				
			||||||
  count = fprintf(stderr, "xwinclip: ");
 | 
					 | 
				
			||||||
  count += vfprintf(stderr, format, ap);
 | 
					 | 
				
			||||||
  va_end(ap);
 | 
					 | 
				
			||||||
  return count;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
int
 | 
					void winDebug(const char *format, ...)
 | 
				
			||||||
ErrorF(const char *format, ...)
 | 
					 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  int count;
 | 
					 | 
				
			||||||
  va_list ap;
 | 
					  va_list ap;
 | 
				
			||||||
  va_start(ap, format);
 | 
					  va_start(ap, format);
 | 
				
			||||||
  count = vfprintf(stderr, format, ap);
 | 
					  fprintf(stderr, "xwinclip: ");
 | 
				
			||||||
 | 
					  vfprintf(stderr, format, ap);
 | 
				
			||||||
 | 
					  va_end(ap);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void ErrorF(const char *format, ...)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  va_list ap;
 | 
				
			||||||
 | 
					  va_start(ap, format);
 | 
				
			||||||
 | 
					  vfprintf(stderr, format, ap);
 | 
				
			||||||
  va_end(ap);
 | 
					  va_end(ap);
 | 
				
			||||||
  return count;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue