Silence warnings
This commit is contained in:
parent
c76f056746
commit
15d2570a3e
7 changed files with 28 additions and 11 deletions
3
packaging/configure
vendored
3
packaging/configure
vendored
|
@ -510,7 +510,8 @@ tint2conf.cflags += ['-DTINT2CONF',
|
|||
'-DINSTALL_PREFIX=\\"{}\\"'.format(prefix),
|
||||
'-DLOCALEDIR=\\"{}\\"'.format(localedir),
|
||||
'-DGETTEXT_PACKAGE=\\"tint2conf\\"',
|
||||
'-DHAVE_VERSION_H']
|
||||
'-DHAVE_VERSION_H',
|
||||
'-Wno-shadow']
|
||||
|
||||
tint2conf.sources = ['src/util/bt.c',
|
||||
'src/util/common.c',
|
||||
|
|
|
@ -209,8 +209,8 @@ void init_X11_pre_config()
|
|||
exit(EXIT_FAILURE);
|
||||
}
|
||||
server.x11_fd = ConnectionNumber(server.display);
|
||||
XSetErrorHandler((XErrorHandler)server_catch_error);
|
||||
XSetIOErrorHandler((XIOErrorHandler)x11_io_error);
|
||||
XSetErrorHandler(server_catch_error);
|
||||
XSetIOErrorHandler(x11_io_error);
|
||||
server_init_atoms();
|
||||
server.screen = DefaultScreen(server.display);
|
||||
server.root_win = RootWindow(server.display, server.screen);
|
||||
|
|
|
@ -399,7 +399,12 @@ void launcher_icon_dump_geometry(void *obj, int indent)
|
|||
Imlib_Image scale_icon(Imlib_Image original, int icon_size)
|
||||
{
|
||||
Imlib_Image icon_scaled;
|
||||
if (original) {
|
||||
if (!icon_size) {
|
||||
icon_scaled = imlib_create_image(1, 1);
|
||||
imlib_context_set_image(icon_scaled);
|
||||
imlib_context_set_color(255, 255, 255, 255);
|
||||
imlib_image_fill_rectangle(0, 0, icon_size, icon_size);
|
||||
} else if (original) {
|
||||
imlib_context_set_image(original);
|
||||
icon_scaled = imlib_create_cropped_scaled_image(0,
|
||||
0,
|
||||
|
|
|
@ -383,6 +383,11 @@ static void menuAbout()
|
|||
|
||||
// ====== Theme import/copy/delete ======
|
||||
|
||||
static void free_data(gpointer data, gpointer userdata)
|
||||
{
|
||||
g_free(data);
|
||||
}
|
||||
|
||||
// Shows open dialog and copies the selected files to ~ without overwrite.
|
||||
static void menuImportFile()
|
||||
{
|
||||
|
@ -407,7 +412,7 @@ static void menuImportFile()
|
|||
gchar *newpath = import_no_overwrite(l->data);
|
||||
g_free(newpath);
|
||||
}
|
||||
g_slist_foreach(list, (GFunc)g_free, NULL);
|
||||
g_slist_foreach(list, free_data, NULL);
|
||||
g_slist_free(list);
|
||||
gtk_widget_destroy(dialog);
|
||||
}
|
||||
|
|
|
@ -362,8 +362,12 @@ pid_t tint_exec(const char *command,
|
|||
// Allow children to exist after parent destruction
|
||||
setsid();
|
||||
// Run the command
|
||||
if (dir)
|
||||
chdir(dir);
|
||||
if (dir) {
|
||||
int ret = chdir(dir);
|
||||
if (ret != 0) {
|
||||
fprintf(stderr, "tint2: failed to chdir to %s\n", dir);
|
||||
}
|
||||
}
|
||||
close_all_fds();
|
||||
reset_signals();
|
||||
if (terminal) {
|
||||
|
|
|
@ -36,8 +36,9 @@
|
|||
|
||||
Server server;
|
||||
|
||||
void server_catch_error(Display *d, XErrorEvent *ev)
|
||||
int server_catch_error(Display *d, XErrorEvent *ev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void server_init_atoms()
|
||||
|
@ -676,9 +677,10 @@ void handle_crash(const char *reason)
|
|||
#endif
|
||||
}
|
||||
|
||||
void x11_io_error(Display *display)
|
||||
int x11_io_error(Display *display)
|
||||
{
|
||||
handle_crash("X11 I/O error");
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef HAVE_SN
|
||||
|
|
|
@ -164,12 +164,12 @@ void send_event32(Window win, Atom at, long data1, long data2, long data3);
|
|||
int get_property32(Window win, Atom at, Atom type);
|
||||
void *server_get_property(Window win, Atom at, Atom type, int *num_results);
|
||||
Atom server_get_atom(char *atom_name);
|
||||
void server_catch_error(Display *d, XErrorEvent *ev);
|
||||
int server_catch_error(Display *d, XErrorEvent *ev);
|
||||
void server_init_atoms();
|
||||
void server_init_visual();
|
||||
void server_init_xdamage();
|
||||
|
||||
void x11_io_error(Display *display);
|
||||
int x11_io_error(Display *display);
|
||||
void handle_crash(const char *reason);
|
||||
|
||||
// detect root background
|
||||
|
|
Loading…
Reference in a new issue