1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-03 04:23:42 -05:00

Cleanup some compile warning on the tests

This commit is contained in:
Dave Davenport 2017-05-03 17:57:08 +02:00
parent 1f76e2c3f3
commit dbf551ec15
10 changed files with 37 additions and 36 deletions

View file

@ -50,19 +50,19 @@ unsigned int test =0;
} \ } \
} }
void config_parse_set_property ( const void *p ) void config_parse_set_property ( G_GNUC_UNUSED const void *p )
{ {
} }
char * rofi_expand_path ( const char *path ) char * rofi_expand_path ( G_GNUC_UNUSED const char *path )
{ {
return NULL;
} }
char * helper_get_theme_path ( const char *file ) char * helper_get_theme_path ( const char *file )
{ {
return g_strdup ( file ); return g_strdup ( file );
} }
void rofi_add_error_message ( GString *msg ) void rofi_add_error_message ( G_GNUC_UNUSED GString *msg )
{ {
} }
int textbox_get_estimated_char_height ( void ); int textbox_get_estimated_char_height ( void );
@ -70,7 +70,7 @@ int textbox_get_estimated_char_height ( void )
{ {
return 16; return 16;
} }
void rofi_view_get_current_monitor ( int *width, int *height ) void rofi_view_get_current_monitor ( G_GNUC_UNUSED int *width, G_GNUC_UNUSED int *height )
{ {
} }

View file

@ -51,7 +51,7 @@ struct xcb_stuff *xcb;
abort ( ); \ abort ( ); \
} \ } \
} }
void rofi_add_error_message ( GString *msg ) void rofi_add_error_message ( G_GNUC_UNUSED GString *msg )
{ {
} }
int rofi_view_error_dialog ( const char *msg, G_GNUC_UNUSED int markup ) int rofi_view_error_dialog ( const char *msg, G_GNUC_UNUSED int markup )
@ -66,7 +66,7 @@ int show_error_message ( const char *msg, int markup )
return 0; return 0;
} }
int main ( int argc, char ** argv ) int main ( G_GNUC_UNUSED int argc, G_GNUC_UNUSED char ** argv )
{ {
if ( setlocale ( LC_ALL, "" ) == NULL ) { if ( setlocale ( LC_ALL, "" ) == NULL ) {
@ -103,17 +103,17 @@ int main ( int argc, char ** argv )
TASSERT ( str == list[3] ); TASSERT ( str == list[3] );
unsigned int u = 1234; unsigned int u = 1234;
unsigned int i = -1234; int d = -1234;
TASSERT ( find_arg_uint ( "-x", &u ) == FALSE ); TASSERT ( find_arg_uint ( "-x", &u ) == FALSE );
TASSERT ( u == 1234 ); TASSERT ( u == 1234 );
TASSERT ( find_arg_int ( "-x", &i ) == FALSE ); TASSERT ( find_arg_int ( "-x", &d ) == FALSE );
TASSERT ( i == -1234 ); TASSERT ( d == -1234 );
TASSERT ( find_arg_uint ( "-u", &u ) == TRUE ); TASSERT ( find_arg_uint ( "-u", &u ) == TRUE );
TASSERT ( u == 4 ); TASSERT ( u == 4 );
TASSERT ( find_arg_uint ( "-i", &u ) == TRUE ); TASSERT ( find_arg_uint ( "-i", &u ) == TRUE );
TASSERT ( u == 4294967293 ); TASSERT ( u == 4294967293 );
TASSERT ( find_arg_int ( "-i", &i ) == TRUE ); TASSERT ( find_arg_int ( "-i", &d ) == TRUE );
TASSERT ( i == -3 ); TASSERT ( d == -3 );
g_strfreev ( list ); g_strfreev ( list );

View file

@ -51,7 +51,7 @@ struct xcb_stuff *xcb;
abort ( ); \ abort ( ); \
} \ } \
} }
void rofi_add_error_message ( GString *msg ) void rofi_add_error_message ( G_GNUC_UNUSED GString *msg )
{ {
} }

View file

@ -42,7 +42,7 @@ static int test = 0;
assert ( a ); \ assert ( a ); \
printf ( "Test %i passed (%s)\n", ++test, # a ); \ printf ( "Test %i passed (%s)\n", ++test, # a ); \
} }
void rofi_add_error_message ( GString *msg ) void rofi_add_error_message ( G_GNUC_UNUSED GString *msg )
{ {
} }
int rofi_view_error_dialog ( const char *msg, G_GNUC_UNUSED int markup ) int rofi_view_error_dialog ( const char *msg, G_GNUC_UNUSED int markup )
@ -51,7 +51,7 @@ int rofi_view_error_dialog ( const char *msg, G_GNUC_UNUSED int markup )
return TRUE; return TRUE;
} }
int show_error_message ( const char *msg, int markup ) int show_error_message ( const char *msg, G_GNUC_UNUSED int markup )
{ {
fputs ( msg, stderr ); fputs ( msg, stderr );
return 0; return 0;
@ -61,7 +61,7 @@ xcb_ewmh_connection_t xcb_ewmh;
int xcb_screen_nbr; int xcb_screen_nbr;
#include <x11-helper.h> #include <x11-helper.h>
int main ( int argc, char ** argv ) int main ( G_GNUC_UNUSED int argc, G_GNUC_UNUSED char ** argv )
{ {
if ( setlocale ( LC_ALL, "" ) == NULL ) { if ( setlocale ( LC_ALL, "" ) == NULL ) {
fprintf ( stderr, "Failed to set locale.\n" ); fprintf ( stderr, "Failed to set locale.\n" );

View file

@ -59,7 +59,7 @@ struct xcb_stuff *xcb;
abort ( ); \ abort ( ); \
} \ } \
} }
void rofi_add_error_message ( GString *msg ) void rofi_add_error_message ( G_GNUC_UNUSED GString *msg )
{ {
} }

View file

@ -42,7 +42,7 @@ static int test = 0;
assert ( a ); \ assert ( a ); \
printf ( "Test %i passed (%s)\n", ++test, # a ); \ printf ( "Test %i passed (%s)\n", ++test, # a ); \
} }
void rofi_add_error_message ( GString *msg ) void rofi_add_error_message ( G_GNUC_UNUSED GString *msg )
{ {
} }
int rofi_view_error_dialog ( const char *msg, G_GNUC_UNUSED int markup ) int rofi_view_error_dialog ( const char *msg, G_GNUC_UNUSED int markup )
@ -51,7 +51,7 @@ int rofi_view_error_dialog ( const char *msg, G_GNUC_UNUSED int markup )
return TRUE; return TRUE;
} }
int show_error_message ( const char *msg, int markup ) int show_error_message ( const char *msg, G_GNUC_UNUSED int markup )
{ {
fputs ( msg, stderr ); fputs ( msg, stderr );
return 0; return 0;
@ -61,7 +61,7 @@ xcb_ewmh_connection_t xcb_ewmh;
int xcb_screen_nbr; int xcb_screen_nbr;
#include <x11-helper.h> #include <x11-helper.h>
int main ( int argc, char ** argv ) int main ( G_GNUC_UNUSED int argc, G_GNUC_UNUSED char ** argv )
{ {
if ( setlocale ( LC_ALL, "" ) == NULL ) { if ( setlocale ( LC_ALL, "" ) == NULL ) {
fprintf ( stderr, "Failed to set locale.\n" ); fprintf ( stderr, "Failed to set locale.\n" );

View file

@ -42,10 +42,10 @@
#include <check.h> #include <check.h>
void rofi_add_error_message ( GString *msg ) void rofi_add_error_message ( G_GNUC_UNUSED GString *msg )
{ {
} }
int monitor_active ( void *d ) int monitor_active ( G_GNUC_UNUSED void *d )
{ {
return 0; return 0;
} }
@ -59,7 +59,7 @@ int textbox_get_estimated_char_height ( void )
{ {
return 16; return 16;
} }
void rofi_view_get_current_monitor ( int *width, int *height ) void rofi_view_get_current_monitor ( G_GNUC_UNUSED int *width, G_GNUC_UNUSED int *height )
{ {
} }
@ -67,10 +67,11 @@ void * rofi_view_get_active ( void )
{ {
return NULL; return NULL;
} }
gboolean rofi_view_trigger_action ( void *state, KeyBindingAction action ) gboolean rofi_view_trigger_action ( G_GNUC_UNUSED void *state, G_GNUC_UNUSED KeyBindingAction action )
{ {
return FALSE;
} }
gboolean x11_parse_key ( const char *combo, unsigned int *mod, xkb_keysym_t *key, gboolean *release, GString *msg ) gboolean x11_parse_key ( G_GNUC_UNUSED const char *combo, G_GNUC_UNUSED unsigned int *mod, G_GNUC_UNUSED xkb_keysym_t *key, G_GNUC_UNUSED gboolean *release, G_GNUC_UNUSED GString *msg )
{ {
return TRUE; return TRUE;
} }

View file

@ -54,15 +54,15 @@ char * helper_get_theme_path ( const char *file )
{ {
return g_strdup ( file ); return g_strdup ( file );
} }
void config_parse_set_property ( const void *p ) void config_parse_set_property ( G_GNUC_UNUSED const void *p )
{ {
} }
void rofi_add_error_message ( GString *msg ) void rofi_add_error_message ( G_GNUC_UNUSED GString *msg )
{} {}
char * rofi_expand_path ( const char *path ) char * rofi_expand_path ( G_GNUC_UNUSED const char *path )
{ {
return NULL;
} }
int textbox_get_estimated_char_height ( void ); int textbox_get_estimated_char_height ( void );
int textbox_get_estimated_char_height ( void ) int textbox_get_estimated_char_height ( void )
@ -74,7 +74,7 @@ void color_separator ( G_GNUC_UNUSED void *d )
} }
void rofi_view_get_current_monitor ( int *width, int *height ) void rofi_view_get_current_monitor ( G_GNUC_UNUSED int *width, G_GNUC_UNUSED int *height )
{ {
} }

View file

@ -49,17 +49,17 @@ unsigned int normal_window_mode = 0;
#include "view.h" #include "view.h"
void config_parse_set_property ( void *p ) void config_parse_set_property ( G_GNUC_UNUSED void *p )
{ {
} }
void rofi_add_error_message ( GString *msg) void rofi_add_error_message ( G_GNUC_UNUSED GString *msg)
{ {
} }
void rofi_view_queue_redraw () void rofi_view_queue_redraw ()
{ {
} }
void rofi_view_get_current_monitor ( int *width, int *height ) void rofi_view_get_current_monitor ( G_GNUC_UNUSED int *width, G_GNUC_UNUSED int *height )
{ {
} }

View file

@ -39,17 +39,17 @@ unsigned int test =0;
assert ( a ); \ assert ( a ); \
printf ( "Test %3i passed (%s)\n", ++test, # a ); \ printf ( "Test %3i passed (%s)\n", ++test, # a ); \
} }
void config_parse_set_property ( const void *p ) void config_parse_set_property ( G_GNUC_UNUSED const void *p )
{ {
} }
void rofi_add_error_message ( GString *msg ) void rofi_add_error_message ( G_GNUC_UNUSED GString *msg )
{ {
} }
void rofi_view_queue_redraw ( void ) void rofi_view_queue_redraw ( void )
{ {
} }
void rofi_view_get_current_monitor ( int *width, int *height ) void rofi_view_get_current_monitor ( G_GNUC_UNUSED int *width, G_GNUC_UNUSED int *height )
{ {
} }