mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 08:00:53 +00:00
libsysprof: fix use of {0} initializers for older GCC
Older GCC versions complain about this so we might as well squash it.
This commit is contained in:
@ -98,7 +98,7 @@ sysprof_battery_source_prepare (SysprofSource *source)
|
|||||||
g_autofree gchar *model_data = NULL;
|
g_autofree gchar *model_data = NULL;
|
||||||
g_autofree gchar *charge_full_data = NULL;
|
g_autofree gchar *charge_full_data = NULL;
|
||||||
SysprofCaptureCounter ctr;
|
SysprofCaptureCounter ctr;
|
||||||
Battery bat = {0};
|
Battery bat = {{0}};
|
||||||
|
|
||||||
/* We dn't care about AC */
|
/* We dn't care about AC */
|
||||||
if (g_strcmp0 (name, "AC") == 0)
|
if (g_strcmp0 (name, "AC") == 0)
|
||||||
@ -141,7 +141,7 @@ sysprof_battery_source_prepare (SysprofSource *source)
|
|||||||
|
|
||||||
if (counters->len > 0)
|
if (counters->len > 0)
|
||||||
{
|
{
|
||||||
SysprofCaptureCounter ctr = {0};
|
SysprofCaptureCounter ctr = {{0}};
|
||||||
|
|
||||||
self->combined_id = sysprof_capture_writer_request_counter (self->writer, 1);
|
self->combined_id = sysprof_capture_writer_request_counter (self->writer, 1);
|
||||||
|
|
||||||
|
|||||||
@ -117,7 +117,7 @@ static Diskstat *
|
|||||||
register_counters_by_name (SysprofDiskstatSource *self,
|
register_counters_by_name (SysprofDiskstatSource *self,
|
||||||
const gchar *name)
|
const gchar *name)
|
||||||
{
|
{
|
||||||
SysprofCaptureCounter ctr[2] = {0};
|
SysprofCaptureCounter ctr[2] = {{{0}}};
|
||||||
Diskstat ds = {0};
|
Diskstat ds = {0};
|
||||||
|
|
||||||
g_assert (SYSPROF_IS_DISKSTAT_SOURCE (self));
|
g_assert (SYSPROF_IS_DISKSTAT_SOURCE (self));
|
||||||
|
|||||||
@ -104,7 +104,7 @@ static Netdev *
|
|||||||
register_counters_by_name (SysprofNetdevSource *self,
|
register_counters_by_name (SysprofNetdevSource *self,
|
||||||
const gchar *name)
|
const gchar *name)
|
||||||
{
|
{
|
||||||
SysprofCaptureCounter ctr[2] = {0};
|
SysprofCaptureCounter ctr[2] = {{{0}}};
|
||||||
g_autofree gchar *rx = NULL;
|
g_autofree gchar *rx = NULL;
|
||||||
g_autofree gchar *tx = NULL;
|
g_autofree gchar *tx = NULL;
|
||||||
Netdev nd = {0};
|
Netdev nd = {0};
|
||||||
@ -155,7 +155,7 @@ sysprof_netdev_source_prepare (SysprofSource *source)
|
|||||||
{
|
{
|
||||||
SysprofNetdevSource *self = (SysprofNetdevSource *)source;
|
SysprofNetdevSource *self = (SysprofNetdevSource *)source;
|
||||||
g_autoptr(GError) error = NULL;
|
g_autoptr(GError) error = NULL;
|
||||||
SysprofCaptureCounter ctr[2] = {0};
|
SysprofCaptureCounter ctr[2] = {{{0}}};
|
||||||
|
|
||||||
g_assert (SYSPROF_IS_NETDEV_SOURCE (self));
|
g_assert (SYSPROF_IS_NETDEV_SOURCE (self));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user