[gjs: 1/16] console: Make print_single_error() infallible
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 1/16] console: Make print_single_error() infallible
- Date: Sat, 3 Nov 2018 02:41:19 +0000 (UTC)
commit 0dc9ffa0d80079f9982c44837b5d0ffc4f954fca
Author: Philip Chimento <philip chimento gmail com>
Date: Sun Oct 28 15:19:13 2018 -0400
console: Make print_single_error() infallible
The return value from this could only be true, and was ignored anyway.
modules/console.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/modules/console.cpp b/modules/console.cpp
index 162292b3..cf5350b2 100644
--- a/modules/console.cpp
+++ b/modules/console.cpp
@@ -63,7 +63,7 @@
enum class PrintErrorKind { Error, Warning, StrictWarning, Note };
template <typename T>
-static bool print_single_error(T* report, PrintErrorKind kind);
+static void print_single_error(T* report, PrintErrorKind kind);
static void print_error_line(const char* prefix, JSErrorNotes::Note* note) {}
static void print_error_line(const char* prefix, JSErrorReport* report);
@@ -92,7 +92,7 @@ gjs_console_print_error(JSErrorReport *report)
}
template <typename T>
-static bool print_single_error(T* report, PrintErrorKind kind) {
+static void print_single_error(T* report, PrintErrorKind kind) {
JS::UniqueChars prefix;
if (report->filename)
prefix.reset(g_strdup_printf("%s:", report->filename));
@@ -144,7 +144,6 @@ static bool print_single_error(T* report, PrintErrorKind kind) {
fputc('\n', stderr);
fflush(stderr);
- return true;
}
static void print_error_line(const char* prefix, JSErrorReport* report) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]