Skip to content
Snippets Groups Projects
Commit 9306b8e9 authored by Guido Gunther's avatar Guido Gunther :zzz:
Browse files

Merge branch 'cleanups' into 'master'

Fix various potential crashers and make avoiding them simpler

See merge request Librem5/phosh!86
parents 09e83439 1e482372
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,7 @@ build:native:
paths:
- _build
script:
- meson . _build
- meson --werror . _build
- ninja -C _build
test:native:
......@@ -49,6 +49,7 @@ test:smoke:one-output:
artifacts:
paths:
- output/*.log
when: always
test:smoke:two-outputs:
<<: *tags
......@@ -63,6 +64,7 @@ test:smoke:two-outputs:
artifacts:
paths:
- output/*.log
when: always
test:smoke:valgrind:
<<: *tags
......@@ -78,4 +80,5 @@ test:smoke:valgrind:
paths:
- vgdump
- output/*.log
when: always
......@@ -45,6 +45,7 @@ test_c_args = [
'-Wswitch-default',
'-Wswitch-enum',
'-Wundef',
'-Wmaybe-uninitialized',
]
if get_option('buildtype') != 'plain'
test_c_args += '-fstack-protector-strong'
......
......@@ -10,7 +10,7 @@ if [ "${PHOSH_VALGRIND}" = 1 ]; then
--tool=memcheck \
--leak-check=full \
--leak-resolution=high \
--num-callers=30 \
--num-callers=40 \
--log-file=vgdump \
--suppressions=${ABS_SRCDIR}/data/valgrind.suppressions \
"
......
......@@ -133,7 +133,7 @@ phosh_auth_finalize (GObject *object)
gint ret;
if (priv->pamh) {
ret = pam_end(priv->pamh, ret);
ret = pam_end(priv->pamh, PAM_AUTH_ERR);
if (ret != PAM_SUCCESS)
g_warning("pam_end error %s", pam_strerror (priv->pamh, ret));
priv->pamh = NULL;
......
......@@ -381,7 +381,7 @@ phosh_monitor_manager_handle_get_current_state (
G_VARIANT_TYPE (LOGICAL_MONITORS_FORMAT));
for (int i = 0; i < self->monitors->len; i++) {
double scale;
double scale = 1.0;
PhoshMonitor *monitor = g_ptr_array_index (self->monitors, i);
GVariantBuilder modes_builder, supported_scales_builder, mode_properties_builder,
monitor_properties_builder;
......
......@@ -359,7 +359,7 @@ phosh_wwan_mm_constructed (GObject *object)
PhoshWWanMMPrivate *priv = phosh_wwan_mm_get_instance_private (self);
const gchar *modem_object_path;
GError *err = NULL;
g_autoptr(GList) modems;
g_autoptr(GList) modems = NULL;
G_OBJECT_CLASS (phosh_wwan_mm_parent_class)->constructed (object);
......
......@@ -216,7 +216,7 @@ phosh_wwan_info_constructed (GObject *object)
priv->wwan = phosh_wwan_mm_new();
g_assert (WWAN_INFO_WWAN_NUM_SIGNALS == g_strv_length(signals));
for (int i; i < WWAN_INFO_WWAN_NUM_SIGNALS; i++) {
for (int i = 0; i < WWAN_INFO_WWAN_NUM_SIGNALS; i++) {
priv->wwan_signal_ids[i] = g_signal_connect_swapped (priv->wwan,
signals[i],
G_CALLBACK (update_icon_data),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment