Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NM plugin fixes #13

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 19 additions & 13 deletions nm/src/nm.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ typedef struct {
} J4statusNmSection;

static GVariant *
_j4status_nm_format_up_eth_callback(const gchar *token, guint64 value, gconstpointer user_data)
_j4status_nm_format_up_eth_callback(G_GNUC_UNUSED const gchar *token, guint64 value, gconstpointer user_data)
{
const J4statusNmFormatUpEthData *data = user_data;
switch ( value )
Expand All @@ -196,7 +196,7 @@ _j4status_nm_format_up_eth_callback(const gchar *token, guint64 value, gconstpoi
}

static GVariant *
_j4status_nm_format_up_wifi_callback(const gchar *token, guint64 value, gconstpointer user_data)
_j4status_nm_format_up_wifi_callback(G_GNUC_UNUSED const gchar *token, guint64 value, gconstpointer user_data)
{
const J4statusNmFormatUpWiFiData *data = user_data;
switch ( value )
Expand All @@ -220,7 +220,7 @@ _j4status_nm_format_up_wifi_callback(const gchar *token, guint64 value, gconstpo
}

static GVariant *
_j4status_nm_format_down_wifi_callback(const gchar *token, guint64 value, gconstpointer user_data)
_j4status_nm_format_down_wifi_callback(G_GNUC_UNUSED const gchar *token, guint64 value, gconstpointer user_data)
{
const gint64 *aps_number = user_data;
switch ( value )
Expand All @@ -237,7 +237,7 @@ _j4status_nm_format_down_wifi_callback(const gchar *token, guint64 value, gconst
}

static GVariant *
_j4status_nm_format_up_other_callback(const gchar *token, guint64 value, gconstpointer user_data)
_j4status_nm_format_up_other_callback(G_GNUC_UNUSED const gchar *token, guint64 value, gconstpointer user_data)
{
switch ( value )
{
Expand All @@ -253,13 +253,15 @@ _j4status_nm_format_up_other_callback(const gchar *token, guint64 value, gconstp
}

static GVariant *
_j4status_nm_format_down_other_callback(const gchar *token, guint64 value, gconstpointer user_data)
_j4status_nm_format_down_other_callback(G_GNUC_UNUSED const gchar *token,
G_GNUC_UNUSED guint64 value,
G_GNUC_UNUSED gconstpointer user_data)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: style, all on the same line

{
return NULL;
}

static void
_j4status_nm_device_get_addresses_ipv4(J4statusPluginContext *context, NMDevice *device, GVariantBuilder *builder)
_j4status_nm_device_get_addresses_ipv4(G_GNUC_UNUSED J4statusPluginContext *context, NMDevice *device, GVariantBuilder *builder)
{
NMIPConfig *ip4_config;

Expand All @@ -277,7 +279,7 @@ _j4status_nm_device_get_addresses_ipv4(J4statusPluginContext *context, NMDevice
}

static void
_j4status_nm_device_get_addresses_ipv6(J4statusPluginContext *context, NMDevice *device, GVariantBuilder *builder)
_j4status_nm_device_get_addresses_ipv6(G_GNUC_UNUSED J4statusPluginContext *context, NMDevice *device, GVariantBuilder *builder)
{
NMIPConfig *ip6_config;

Expand Down Expand Up @@ -471,7 +473,8 @@ _j4status_nm_device_update(J4statusPluginContext *context, J4statusNmSection *se
}

static void
_j4status_nm_access_point_property_changed(NMAccessPoint *device, GParamSpec *pspec, gpointer user_data)
_j4status_nm_access_point_property_changed(G_GNUC_UNUSED NMAccessPoint *device,
G_GNUC_UNUSED GParamSpec *pspec, gpointer user_data)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: style

{
J4statusNmSection *section = user_data;
_j4status_nm_device_update(section->context, section, section->device);
Expand All @@ -496,14 +499,17 @@ _j4status_nm_device_property_changed(NMDevice *device, GParamSpec *pspec, gpoint
}

static void
_j4status_nm_device_state_changed(NMDevice *device, guint state, guint arg2, guint arg3, gpointer user_data)
_j4status_nm_device_state_changed(NMDevice *device,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: style

G_GNUC_UNUSED guint state,
G_GNUC_UNUSED guint arg2,
G_GNUC_UNUSED guint arg3, gpointer user_data)
{
J4statusNmSection *section = user_data;
_j4status_nm_device_update(section->context, section, device);
}

static void
_j4status_nm_device_monitor(gpointer key, gpointer data, gpointer user_data)
_j4status_nm_device_monitor(G_GNUC_UNUSED gpointer key, gpointer data, G_GNUC_UNUSED gpointer user_data)
{
J4statusNmSection *section = data;

Expand All @@ -526,7 +532,7 @@ _j4status_nm_device_monitor(gpointer key, gpointer data, gpointer user_data)
}

static void
_j4status_nm_device_unmonitor(gpointer key, gpointer data, gpointer user_data)
_j4status_nm_device_unmonitor(G_GNUC_UNUSED gpointer key, gpointer data, G_GNUC_UNUSED gpointer user_data)
{
J4statusNmSection *section = data;

Expand Down Expand Up @@ -638,7 +644,7 @@ _j4status_nm_section_detach_device(J4statusNmSection *section)
}

static void
_j4status_nm_client_device_added(NMClient *client, NMDevice *device, gpointer user_data)
_j4status_nm_client_device_added(G_GNUC_UNUSED NMClient *client, NMDevice *device, gpointer user_data)
{
J4statusPluginContext *context = user_data;
J4statusNmSection *section;
Expand All @@ -648,7 +654,7 @@ _j4status_nm_client_device_added(NMClient *client, NMDevice *device, gpointer us
}

static void
_j4status_nm_client_device_removed(NMClient *client, NMDevice *device, gpointer user_data)
_j4status_nm_client_device_removed(G_GNUC_UNUSED NMClient *client, NMDevice *device, gpointer user_data)
{
J4statusPluginContext *context = user_data;
J4statusNmSection *section;
Expand Down