Skip to content

Commit

Permalink
Silence gcc warnings caused by glib internals.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Stafford committed Oct 22, 2020
1 parent d6d6ed0 commit 26fc931
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pocplot.c
Original file line number Diff line number Diff line change
Expand Up @@ -827,9 +827,12 @@ poc_plot_remove_dataset_internal (PocPlot *self, PocDataset *dataset)
{
PocAxis *axis;

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
g_signal_handlers_disconnect_by_func (dataset,
G_CALLBACK (poc_plot_notify_update),
self);
#pragma GCC diagnostic pop
if ((axis = poc_dataset_get_x_axis (dataset)) != NULL)
poc_plot_remove_axis (self, axis);
if ((axis = poc_dataset_get_y_axis (dataset)) != NULL)
Expand Down Expand Up @@ -1002,9 +1005,12 @@ poc_plot_remove_axis (PocPlot *self, PocAxis *axis)

if (poc_object_bag_remove (self->axes, G_OBJECT (axis)))
{
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
g_signal_handlers_disconnect_by_func (axis,
G_CALLBACK (poc_plot_notify_update),
self);
#pragma GCC diagnostic pop
if (axis == self->x_axis)
{
g_clear_object (&self->x_axis);
Expand Down
9 changes: 9 additions & 0 deletions poctypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ poc_point_free (PocPoint *pt)
g_slice_free (PocPoint, pt);
}

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
G_DEFINE_BOXED_TYPE (PocPoint, poc_point, poc_point_copy, poc_point_free)
#pragma GCC diagnostic pop

/* Point array {{{1 */

Expand Down Expand Up @@ -142,8 +145,11 @@ poc_point_array_set_size (PocPointArray *array, guint size)
return (PocPointArray *) g_array_set_size ((GArray *) array, size);
}

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
G_DEFINE_BOXED_TYPE (PocPointArray, poc_point_array,
poc_point_array_ref, poc_point_array_unref)
#pragma GCC diagnostic pop

/* Double array {{{1 */

Expand Down Expand Up @@ -231,8 +237,11 @@ poc_double_array_unref (PocDoubleArray *array)
g_array_unref ((GArray *) array);
}

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
G_DEFINE_BOXED_TYPE (PocDoubleArray, poc_double_array,
poc_double_array_ref, poc_double_array_unref)
#pragma GCC diagnostic pop


/* Enums {{{1 */
Expand Down

0 comments on commit 26fc931

Please sign in to comment.