summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am3
-rw-r--r--include/textbox.h4
-rw-r--r--source/dialogs/script-dialog.c2
-rw-r--r--source/rofi.c2
-rw-r--r--source/textbox.c12
-rw-r--r--source/xrmoptions.c2
-rw-r--r--test/history-test.c2
-rw-r--r--test/textbox-test.c2
8 files changed, 15 insertions, 14 deletions
diff --git a/Makefile.am b/Makefile.am
index 21172e51..69b068ed 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,7 +19,8 @@ AM_CFLAGS=\
-DMANPAGE_PATH="\"$(mandir)/man1/rofi.1\""\
-I$(top_srcdir)/include/\
-I$(top_srcdir)/config/\
- -I$(top_builddir)/
+ -I$(top_builddir)/\
+ -Werror=missing-prototypes
rofi_SOURCES=\
source/rofi.c\
diff --git a/include/textbox.h b/include/textbox.h
index e618b2d8..c37f3cea 100644
--- a/include/textbox.h
+++ b/include/textbox.h
@@ -156,7 +156,7 @@ void textbox_setup ( XVisualInfo *visual, Colormap colormap,
/**
* Cleanup the allocated colors and fonts by textbox_setup().
*/
-void textbox_cleanup ( );
+void textbox_cleanup ( void );
/**
* @param tb Handle to the textbox
@@ -199,7 +199,7 @@ int textbox_get_font_width ( textbox *tb );
*
* @returns the width of a character in pixels.
*/
-double textbox_get_estimated_char_width ( );
+double textbox_get_estimated_char_width ( void );
/**
diff --git a/source/dialogs/script-dialog.c b/source/dialogs/script-dialog.c
index 73a528e3..c7e699b6 100644
--- a/source/dialogs/script-dialog.c
+++ b/source/dialogs/script-dialog.c
@@ -70,7 +70,7 @@ static char **get_script_output ( char *command, unsigned int *length )
return retv;
}
-char **execute_executor ( ScriptOptions *options, const char *result, unsigned int *length )
+static char **execute_executor ( ScriptOptions *options, const char *result, unsigned int *length )
{
char **retv = NULL;
diff --git a/source/rofi.c b/source/rofi.c
index 76c8f366..4c6dc043 100644
--- a/source/rofi.c
+++ b/source/rofi.c
@@ -257,7 +257,7 @@ static int levenshtein ( const char *s, const char *t )
return dist ( s, t, d, ls, lt, 0, 0 );
}
-Window create_window ( Display *display )
+static Window create_window ( Display *display )
{
XSetWindowAttributes attr;
attr.colormap = map;
diff --git a/source/textbox.c b/source/textbox.c
index dd2e202f..65f6b38d 100644
--- a/source/textbox.c
+++ b/source/textbox.c
@@ -331,7 +331,7 @@ void textbox_cursor_dec ( textbox *tb )
}
// Move word right
-void textbox_cursor_inc_word ( textbox *tb )
+static void textbox_cursor_inc_word ( textbox *tb )
{
if ( tb->text == NULL ) {
return;
@@ -371,7 +371,7 @@ void textbox_cursor_inc_word ( textbox *tb )
textbox_cursor ( tb, index );
}
// move word left
-void textbox_cursor_dec_word ( textbox *tb )
+static void textbox_cursor_dec_word ( textbox *tb )
{
// Find word boundaries, with pango_Break?
gchar *n;
@@ -467,7 +467,7 @@ void textbox_cursor_bkspc ( textbox *tb )
textbox_cursor_del ( tb );
}
}
-void textbox_cursor_bkspc_word ( textbox *tb )
+static void textbox_cursor_bkspc_word ( textbox *tb )
{
if ( tb->cursor > 0 ) {
int cursor = tb->cursor;
@@ -477,7 +477,7 @@ void textbox_cursor_bkspc_word ( textbox *tb )
}
}
}
-void textbox_cursor_del_word ( textbox *tb )
+static void textbox_cursor_del_word ( textbox *tb )
{
if ( tb->cursor >= 0 ) {
int cursor = tb->cursor;
@@ -626,7 +626,7 @@ void textbox_setup ( XVisualInfo *visual, Colormap colormap,
}
-void textbox_cleanup ( )
+void textbox_cleanup ( void )
{
if ( p_context ) {
XftColorFree ( display, visual_info->visual, target_colormap, &color_fg );
@@ -665,7 +665,7 @@ int textbox_get_font_width ( textbox *tb )
return width;
}
-double textbox_get_estimated_char_width ( )
+double textbox_get_estimated_char_width ( void )
{
// Create a temp layout with right font.
PangoLayout *layout = pango_layout_new ( p_context );
diff --git a/source/xrmoptions.c b/source/xrmoptions.c
index fd19bc2a..16bde5a8 100644
--- a/source/xrmoptions.c
+++ b/source/xrmoptions.c
@@ -294,7 +294,7 @@ void config_xresource_free ( void )
}
}
-void xresource_dump_entry ( const char *namePrefix, XrmOption *option )
+static void xresource_dump_entry ( const char *namePrefix, XrmOption *option )
{
printf ( "%s.%s: %*s", namePrefix, option->name,
(int) ( 20 - strlen ( option->name ) ), "" );
diff --git a/test/history-test.c b/test/history-test.c
index 2ac2c846..199f0443 100644
--- a/test/history-test.c
+++ b/test/history-test.c
@@ -16,7 +16,7 @@ static int test = 0;
const char *file = "text";
-void history_test()
+static void history_test( void )
{
unlink(file);
diff --git a/test/textbox-test.c b/test/textbox-test.c
index bd8ef80f..fdab21ec 100644
--- a/test/textbox-test.c
+++ b/test/textbox-test.c
@@ -97,7 +97,7 @@ int main ( G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv )
TASSERT( textbox_get_width( box) >= textbox_get_font_width( box) );
TASSERT( textbox_get_height( box) >= textbox_get_font_height( box) );
- TASSERT( textbox_get_estimated_char_width ( box) > 0 );
+ TASSERT( textbox_get_estimated_char_width ( ) > 0 );
textbox_cursor_bkspc ( box );
TASSERT ( strcmp(box->text, "tesbo") == 0 );