mirror of
https://github.com/davatorium/rofi.git
synced 2025-07-31 21:59:25 -04:00
Fix test compile warning.
This commit is contained in:
parent
682907d340
commit
f6bc8f7c32
3 changed files with 4 additions and 20 deletions
|
@ -11,7 +11,7 @@ static int test = 0;
|
||||||
printf("Test %i passed (%s)\n", ++test, #a);\
|
printf("Test %i passed (%s)\n", ++test, #a);\
|
||||||
}
|
}
|
||||||
|
|
||||||
int main ( int argc, char ** argv )
|
int main ( G_GNUC_UNUSED int argc, G_GNUC_UNUSED char ** argv )
|
||||||
{
|
{
|
||||||
char **list = NULL;
|
char **list = NULL;
|
||||||
int llength = 0;
|
int llength = 0;
|
||||||
|
|
|
@ -61,7 +61,7 @@ void history_test()
|
||||||
|
|
||||||
g_strfreev(retv);
|
g_strfreev(retv);
|
||||||
|
|
||||||
for(int in=length+1; in < 26; in++) {
|
for(unsigned int in=length+1; in < 26; in++) {
|
||||||
char *p = g_strdup_printf("aap%i", in);
|
char *p = g_strdup_printf("aap%i", in);
|
||||||
printf("%s- %d\n",p, in);
|
printf("%s- %d\n",p, in);
|
||||||
history_set( file, p);
|
history_set( file, p);
|
||||||
|
@ -83,22 +83,9 @@ void history_test()
|
||||||
|
|
||||||
g_strfreev(retv);
|
g_strfreev(retv);
|
||||||
|
|
||||||
// Test fail.
|
|
||||||
history_set ( NULL, "aap");
|
|
||||||
|
|
||||||
retv = history_get_list ( NULL , &length);
|
|
||||||
printf("Test %i passed\n", ++test);
|
|
||||||
|
|
||||||
TASSERT ( retv == NULL );
|
|
||||||
TASSERT ( length == 0 );
|
|
||||||
|
|
||||||
history_remove ( NULL, "aap" );
|
|
||||||
printf("Test %i passed\n", ++test);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main ( int argc, char **argv )
|
int main ( G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv )
|
||||||
{
|
{
|
||||||
history_test();
|
history_test();
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,6 @@ XVisualInfo vinfo;
|
||||||
|
|
||||||
static unsigned int color_get ( Display *display, const char *const name )
|
static unsigned int color_get ( Display *display, const char *const name )
|
||||||
{
|
{
|
||||||
int screen_id = DefaultScreen ( display );
|
|
||||||
XColor color;
|
XColor color;
|
||||||
// Special format.
|
// Special format.
|
||||||
if ( strncmp ( name, "argb:", 5 ) == 0 ) {
|
if ( strncmp ( name, "argb:", 5 ) == 0 ) {
|
||||||
|
@ -53,7 +52,7 @@ static void create_visual_and_colormap()
|
||||||
map = DefaultColormap( display, DefaultScreen (display));
|
map = DefaultColormap( display, DefaultScreen (display));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int main ( int argc, char **argv )
|
int main ( G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv )
|
||||||
{
|
{
|
||||||
|
|
||||||
// Get DISPLAY
|
// Get DISPLAY
|
||||||
|
@ -64,8 +63,6 @@ int main ( int argc, char **argv )
|
||||||
}
|
}
|
||||||
create_visual_and_colormap();
|
create_visual_and_colormap();
|
||||||
TASSERT( display != NULL );
|
TASSERT( display != NULL );
|
||||||
Screen *screen = DefaultScreenOfDisplay ( display );
|
|
||||||
Window root = RootWindow ( display, XScreenNumberOfScreen ( screen ) );
|
|
||||||
XSetWindowAttributes attr;
|
XSetWindowAttributes attr;
|
||||||
attr.colormap = map;
|
attr.colormap = map;
|
||||||
attr.border_pixel = color_get ( display, config.menu_bc );
|
attr.border_pixel = color_get ( display, config.menu_bc );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue