A fork of Gnome-control-center with some tweaks
This is just unfortunate. It’s an aliasing violation to cast a pointer
to a pointer (and there’s no way round that), although in practice it
will not cause a problem. People do quite often compile with
`-Werror=strict-aliasing`, though, so fixing the warnings is helpful.
Warnings are of the form:
```
../../source/gnome-control-center/panels/keyboard/cc-keyboard-shortcut-dialog.c: In function ‘cc_keyboard_shortcut_dialog_finalize’:
../../source/gnome-control-center/panels/keyboard/cc-keyboard-shortcut-dialog.c:518:20: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
518 | g_clear_pointer ((GtkWindow**)&self->shortcut_editor, gtk_window_destroy);
/opt/gnome/install/include/glib-2.0/glib/gmacros.h:871:47: note: in definition of macro ‘G_STATIC_ASSERT’
871 | #define G_STATIC_ASSERT(expr) _Static_assert (expr, "Expression evaluates to false")
| ^~~~
../../source/gnome-control-center/panels/keyboard/cc-keyboard-shortcut-dialog.c:518:3: note: in expansion of macro ‘g_clear_pointer’
518 | g_clear_pointer ((GtkWindow**)&self->shortcut_editor, gtk_window_destroy);
| ^~~~~~~~~~~~~~~
In file included from /opt/gnome/install/include/glib-2.0/glib/gatomic.h:30,
from /opt/gnome/install/include/glib-2.0/glib/gthread.h:34,
from /opt/gnome/install/include/glib-2.0/glib/gasyncqueue.h:34,
from /opt/gnome/install/include/glib-2.0/glib.h:34:
../../source/gnome-control-center/panels/keyboard/cc-keyboard-shortcut-dialog.c:518:20: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
518 | g_clear_pointer ((GtkWindow**)&self->shortcut_editor, gtk_window_destroy);
/opt/gnome/install/include/glib-2.0/glib/glib-typeof.h:39:36: note: in definition of macro ‘glib_typeof’
39 | #define glib_typeof(t) __typeof__ (t)
| ^
../../source/gnome-control-center/panels/keyboard/cc-keyboard-shortcut-dialog.c:518:3: note: in expansion of macro ‘g_clear_pointer’
518 | g_clear_pointer ((GtkWindow**)&self->shortcut_editor, gtk_window_destroy);
| ^~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
```
I believe it’s better to fix these by expanding out the
`g_clear_pointer()` call, than by changing the types of variables — the
latter approach means everything becomes a `GtkWidget` or a `GtkWindow`,
which loses type specificity. So this approach is in contrast to that
taken in commit
|
||
---|---|---|
.gitlab/issue_templates | ||
.gitlab-ci | ||
build-aux | ||
data/icons | ||
docs | ||
gettext/its | ||
man | ||
panels | ||
po | ||
search-provider | ||
shell | ||
subprojects | ||
tests | ||
.clang-format | ||
.gitignore | ||
.gitlab-ci.yml | ||
.gitmodules | ||
COPYING | ||
gnome-control-center.doap | ||
meson.build | ||
meson_options.txt | ||
NEWS | ||
README.md |
GNOME Settings
GNOME Settings is GNOME's main interface for configuration of various aspects of your desktop.
If you are looking for usage tips and instructions, you can find it at the User Documentation (translated in various languages).
Reporting Issues
Before reporting any bugs or opening feature requests, read the communication guidelines.
Report issues to the GNOME issue tracking system.
Feature Requests
For feature requests or conceptual changes, please start a topic on GNOME Discourse.
Contributing
See docs/CONTRIBUTING.md
for details on the contribution process, and docs/CODING_STYLE.md
for the coding style guidelines.
Visit the Settings development wiki for more information.