From 42c1e3c3347555898d85d17552444e885c8c31ec Mon Sep 17 00:00:00 2001 From: Rafael Roquetto Date: Thu, 28 Jul 2022 09:44:12 +1000 Subject: [PATCH] Revert "Fix build with -trace lttng" This reverts commit 756c65d3676d2b3ce5c7b56145e5f0f7cf7178ad. "justified_worry" is an incorrect workaround which attempted to silence tracegen when invalid types were being used. This caused Qt to compile, but with broken/invalid tracepoints. The proper solution involves fixing the tracepoints in question. Change-Id: I96de254944f0367808527d215e87a5d66bb442f4 Reviewed-by: Shawn Rutledge --- src/gui/qtgui.tracepoints | 2 +- src/tools/tracegen/lttng.cpp | 3 +-- src/tools/tracegen/panic.cpp | 13 ------------- src/tools/tracegen/panic.h | 1 - 4 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/gui/qtgui.tracepoints b/src/gui/qtgui.tracepoints index 0be765a4f3..4a96e23191 100644 --- a/src/gui/qtgui.tracepoints +++ b/src/gui/qtgui.tracepoints @@ -27,7 +27,7 @@ QImage_scaledToHeight_entry(int h, Qt::TransformationMode mode) QImage_scaledToHeight_exit() QImage_rgbSwapped_helper_entry() QImage_rgbSwapped_helper_exit() -QImage_transformed_entry(const QTransform &matrix, Qt::TransformationMode mode) +QImage_transformed_entry(const QTransform &matrix, Qt::TransformationMode mode ) QImage_transformed_exit() QPixmap_scaled_entry(const QSize& s, Qt::AspectRatioMode aspectMode, Qt::TransformationMode mode) diff --git a/src/tools/tracegen/lttng.cpp b/src/tools/tracegen/lttng.cpp index dd7d405e7a..1ca3f4a974 100644 --- a/src/tools/tracegen/lttng.cpp +++ b/src/tools/tracegen/lttng.cpp @@ -66,8 +66,7 @@ static void writeCtfMacro(QTextStream &stream, const Tracepoint::Field &field) << "ctf_integer(int, height, " << name << ".height()) "; return; case Tracepoint::Field::Unknown: - justified_worry("Cannot deduce CTF type for '%s %s'", qPrintable(paramType), - qPrintable(name)); + panic("Cannot deduce CTF type for '%s %s", qPrintable(paramType), qPrintable(name)); break; } } diff --git a/src/tools/tracegen/panic.cpp b/src/tools/tracegen/panic.cpp index aca816aa7a..5258b5ba9d 100644 --- a/src/tools/tracegen/panic.cpp +++ b/src/tools/tracegen/panic.cpp @@ -21,16 +21,3 @@ void panic(const char *fmt, ...) exit(EXIT_FAILURE); } - -void justified_worry(const char *fmt, ...) -{ - va_list ap; - - fprintf(stderr, "tracegen: warning: "); - - va_start(ap, fmt); - vfprintf(stderr, fmt, ap); - va_end(ap); - - fputc('\n', stderr); -} diff --git a/src/tools/tracegen/panic.h b/src/tools/tracegen/panic.h index d44d2b4e12..51cd96fba6 100644 --- a/src/tools/tracegen/panic.h +++ b/src/tools/tracegen/panic.h @@ -5,6 +5,5 @@ #define PANIC_H void panic(const char *fmt, ...); -void justified_worry(const char *fmt, ...); #endif // PANIC_H