[gjs: 16/18] profiler: More specific struct initializer expressions
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 16/18] profiler: More specific struct initializer expressions
- Date: Mon, 5 Oct 2020 02:09:53 +0000 (UTC)
commit 44ad7760ad500d81caa1369968b7772a47e4e52e
Author: Philip Chimento <philip chimento gmail com>
Date: Wed Sep 30 18:27:15 2020 -0700
profiler: More specific struct initializer expressions
This is for compiling warning-free on Clang.
gjs/profiler.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gjs/profiler.cpp b/gjs/profiler.cpp
index 07ff1b0c..b0b267b6 100644
--- a/gjs/profiler.cpp
+++ b/gjs/profiler.cpp
@@ -407,9 +407,9 @@ gjs_profiler_start(GjsProfiler *self)
g_return_if_fail(!self->capture);
- struct sigaction sa = { 0 };
- struct sigevent sev = { 0 };
- struct itimerspec its = { 0 };
+ struct sigaction sa = {{0}};
+ struct sigevent sev = {{0}};
+ struct itimerspec its = {{0}};
struct itimerspec old_its;
if (self->target_capture) {
@@ -543,7 +543,7 @@ gjs_profiler_stop(GjsProfiler *self)
#ifdef ENABLE_PROFILER
- struct itimerspec its = { 0 };
+ struct itimerspec its = {{0}};
timer_settime(self->timer, 0, &its, nullptr);
timer_delete(self->timer);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]