Correctness and trivial stuff.

SVN revision: 36795
This commit is contained in:
Kim Woelders 2008-10-18 21:20:53 +00:00
parent c8f3f10a81
commit b2cba87582
8 changed files with 13 additions and 9 deletions

View File

@ -481,7 +481,7 @@ void SignalsSetup(void);
void SignalsRestore(void);
/* main.c */
void EExit(int exitcode);
__NORETURN__ void EExit(int exitcode);
const char *EDirRoot(void);
const char *EDirBin(void);
const char *EDirUser(void);

View File

@ -199,7 +199,7 @@ ShowAlert(const char *title,
dd = XOpenDisplay(NULL);
if (!dd)
{
fprintf(stderr, text);
fprintf(stderr, "%s", text);
fflush(stderr);
return;
}

View File

@ -1830,7 +1830,7 @@ IPC_Help(const char *params)
nick = (ipc->nick) ? ipc->nick : "";
IpcPrintf("%18s %4s: %s\n", ipc->name, nick, ipc->help_text);
if (ipc->extended_help_text)
IpcPrintf(ipc->extended_help_text);
IpcPrintf("%s", ipc->extended_help_text);
}
}
else
@ -1847,7 +1847,7 @@ IPC_Help(const char *params)
IpcPrintf("%18s %4s: %s\n", ipc->name, nick, ipc->help_text);
IpcPrintf("----------------------------------------\n");
if (ipc->extended_help_text)
IpcPrintf(ipc->extended_help_text);
IpcPrintf("%s", ipc->extended_help_text);
}
}
}

View File

@ -60,12 +60,14 @@ ScreenAdd(int type, int head, int x, int y, unsigned int w, unsigned int h)
void
ScreenInit(void)
{
n_screens = 0; /* Causes reconfiguration */
#ifdef HAVE_XINERAMA
XineramaScreenInfo *screens;
int i, num_screens;
#endif
n_screens = 0; /* Causes reconfiguration */
#ifdef HAVE_XINERAMA
if (Mode.wm.window)
return;

View File

@ -492,7 +492,7 @@ SessionSave(int shutdown)
* and then restore it on restart. We grab X input via the ext_init_win
* so the our clients remain frozen while we are down.
*/
static void
__NORETURN__ static void
doSMExit(int mode, const char *params)
{
int l;

View File

@ -365,9 +365,9 @@ TextstateTextFitMB(TextState * ts, char **ptext, int *pw, int textwidth_limit)
while (*pw > textwidth_limit)
{
nuke_count++;
int len_mb;
nuke_count++;
if (nuke_count >= wc_len - 1)
{
int mlen;

View File

@ -45,8 +45,10 @@
#if HAVE___ATTRIBUTE__
#define __PRINTF_N__(no) __attribute__((__format__(__printf__, (no), (no)+1)))
#define __NORETURN__ __attribute__((noreturn))
#else
#define __PRINTF_N__(no)
#define __NORETURN__
#endif
#define __PRINTF__ __PRINTF_N__(1)
#define __PRINTF_2__ __PRINTF_N__(2)

View File

@ -1718,7 +1718,7 @@ EDisplayOpen(const char *dstr, int scr)
if (scr >= 0)
{
/* Override screen */
Esnprintf(dbuf, sizeof(dbuf) - 10, dstr);
Esnprintf(dbuf, sizeof(dbuf) - 10, "%s", dstr);
s = strchr(dbuf, ':');
if (s)
{