Bug 551879 - TM: remove shell/js.cpp and editline.c warnings. r=gal.

This commit is contained in:
Nicholas Nethercote 2010-03-12 17:33:54 +11:00
parent 1f8943a00a
commit 64a20b3120
2 changed files with 7 additions and 2 deletions

View File

@ -169,7 +169,10 @@ STATIC void
TTYflush()
{
if (ScreenCount) {
(void)write(1, Screen, ScreenCount);
/* Dummy assignment avoids GCC warning on
* "attribute warn_unused_result" */
ssize_t dummy = write(1, Screen, ScreenCount);
(void)dummy;
ScreenCount = 0;
}
}

View File

@ -3534,7 +3534,9 @@ CancelExecution(JSRuntime *rt)
static const char msg[] = "Script runs for too long, terminating.\n";
#if defined(XP_UNIX) && !defined(JS_THREADSAFE)
/* It is not safe to call fputs from signals. */
write(2, msg, sizeof(msg) - 1);
/* Dummy assignment avoids GCC warning on "attribute warn_unused_result" */
ssize_t dummy = write(2, msg, sizeof(msg) - 1);
(void)dummy;
#else
fputs(msg, stderr);
#endif