1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-25 13:55:34 -05:00

Make compiler more picky.

Add -Werror=missing-prototypes
This commit is contained in:
Dave Davenport 2015-02-18 08:53:38 +01:00
parent 95f7d2d7cd
commit 8b50e94fea
8 changed files with 15 additions and 14 deletions

View file

@ -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\

View file

@ -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 );
/**

View file

@ -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;

View file

@ -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;

View file

@ -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 );

View file

@ -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 ) ), "" );

View file

@ -16,7 +16,7 @@ static int test = 0;
const char *file = "text";
void history_test()
static void history_test( void )
{
unlink(file);

View file

@ -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 );