Silence warnings

This commit is contained in:
Chris Lee
2018-12-31 18:23:41 +01:00
parent c76f056746
commit 15d2570a3e
7 changed files with 28 additions and 11 deletions

View File

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

View File

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

View File

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