summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/box-test.c10
-rw-r--r--test/helper-config-cmdline-parser.c14
-rw-r--r--test/helper-expand.c2
-rw-r--r--test/helper-pidfile.c6
-rw-r--r--test/helper-test.c2
-rw-r--r--test/helper-tokenize.c6
-rw-r--r--test/mode-test.c11
-rw-r--r--test/scrollbar-test.c10
-rw-r--r--test/textbox-test.c6
-rw-r--r--test/widget-test.c6
10 files changed, 37 insertions, 36 deletions
diff --git a/test/box-test.c b/test/box-test.c
index bb104cab..a2840c49 100644
--- a/test/box-test.c
+++ b/test/box-test.c
@@ -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 )
{
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 );
@@ -70,7 +70,7 @@ int textbox_get_estimated_char_height ( void )
{
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 )
{
}
diff --git a/test/helper-config-cmdline-parser.c b/test/helper-config-cmdline-parser.c
index f3642f53..473a4f85 100644
--- a/test/helper-config-cmdline-parser.c
+++ b/test/helper-config-cmdline-parser.c
@@ -51,7 +51,7 @@ struct xcb_stuff *xcb;
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 )
@@ -66,7 +66,7 @@ int show_error_message ( const char *msg, int markup )
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 ) {
@@ -103,17 +103,17 @@ int main ( int argc, char ** argv )
TASSERT ( str == list[3] );
unsigned int u = 1234;
- unsigned int i = -1234;
+ int d = -1234;
TASSERT ( find_arg_uint ( "-x", &u ) == FALSE );
TASSERT ( u == 1234 );
- TASSERT ( find_arg_int ( "-x", &i ) == FALSE );
- TASSERT ( i == -1234 );
+ TASSERT ( find_arg_int ( "-x", &d ) == FALSE );
+ TASSERT ( d == -1234 );
TASSERT ( find_arg_uint ( "-u", &u ) == TRUE );
TASSERT ( u == 4 );
TASSERT ( find_arg_uint ( "-i", &u ) == TRUE );
TASSERT ( u == 4294967293 );
- TASSERT ( find_arg_int ( "-i", &i ) == TRUE );
- TASSERT ( i == -3 );
+ TASSERT ( find_arg_int ( "-i", &d ) == TRUE );
+ TASSERT ( d == -3 );
g_strfreev ( list );
diff --git a/test/helper-expand.c b/test/helper-expand.c
index 9b30b41e..bbc9c155 100644
--- a/test/helper-expand.c
+++ b/test/helper-expand.c
@@ -51,7 +51,7 @@ struct xcb_stuff *xcb;
abort ( ); \
} \
}
-void rofi_add_error_message ( GString *msg )
+void rofi_add_error_message ( G_GNUC_UNUSED GString *msg )
{
}
diff --git a/test/helper-pidfile.c b/test/helper-pidfile.c
index 889d1766..0815c9cf 100644
--- a/test/helper-pidfile.c
+++ b/test/helper-pidfile.c
@@ -42,7 +42,7 @@ static int test = 0;
assert ( 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 )
@@ -51,7 +51,7 @@ int rofi_view_error_dialog ( const char *msg, G_GNUC_UNUSED int markup )
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 );
return 0;
@@ -61,7 +61,7 @@ xcb_ewmh_connection_t xcb_ewmh;
int xcb_screen_nbr;
#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 ) {
fprintf ( stderr, "Failed to set locale.\n" );
diff --git a/test/helper-test.c b/test/helper-test.c
index 86d65144..4114d0b5 100644
--- a/test/helper-test.c
+++ b/test/helper-test.c
@@ -59,7 +59,7 @@ struct xcb_stuff *xcb;
abort ( ); \
} \
}
-void rofi_add_error_message ( GString *msg )
+void rofi_add_error_message ( G_GNUC_UNUSED GString *msg )
{
}
diff --git a/test/helper-tokenize.c b/test/helper-tokenize.c
index 6f2b31f7..22fffd03 100644
--- a/test/helper-tokenize.c
+++ b/test/helper-tokenize.c
@@ -42,7 +42,7 @@ static int test = 0;
assert ( 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 )
@@ -51,7 +51,7 @@ int rofi_view_error_dialog ( const char *msg, G_GNUC_UNUSED int markup )
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 );
return 0;
@@ -61,7 +61,7 @@ xcb_ewmh_connection_t xcb_ewmh;
int xcb_screen_nbr;
#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 ) {
fprintf ( stderr, "Failed to set locale.\n" );
diff --git a/test/mode-test.c b/test/mode-test.c
index 49d441b8..0510c408 100644
--- a/test/mode-test.c
+++ b/test/mode-test.c
@@ -42,10 +42,10 @@
#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;
}
@@ -59,7 +59,7 @@ int textbox_get_estimated_char_height ( void )
{
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;
}
-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;
}
diff --git a/test/scrollbar-test.c b/test/scrollbar-test.c
index 17c51d4b..1a9ee848 100644
--- a/test/scrollbar-test.c
+++ b/test/scrollbar-test.c
@@ -54,15 +54,15 @@ char * helper_get_theme_path ( const char *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 )
@@ -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 )
{
}
diff --git a/test/textbox-test.c b/test/textbox-test.c
index ce954f3c..3b1ceb7e 100644
--- a/test/textbox-test.c
+++ b/test/textbox-test.c
@@ -49,17 +49,17 @@ unsigned int normal_window_mode = 0;
#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_get_current_monitor ( int *width, int *height )
+void rofi_view_get_current_monitor ( G_GNUC_UNUSED int *width, G_GNUC_UNUSED int *height )
{
}
diff --git a/test/widget-test.c b/test/widget-test.c
index eab08e4a..ab9da425 100644
--- a/test/widget-test.c
+++ b/test/widget-test.c
@@ -39,17 +39,17 @@ unsigned int test =0;
assert ( 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_get_current_monitor ( int *width, int *height )
+void rofi_view_get_current_monitor ( G_GNUC_UNUSED int *width, G_GNUC_UNUSED int *height )
{
}