In file included from glib/glibconfig.h:9,
from ../glib.git/glib/gtypes.h:32,
from ../glib.git/glib/gquark.h:32,
from ../glib.git/glib/gerror.h:28,
from ../glib.git/glib/gmarkup.h:28,
from ../glib.git/glib/gmarkup.c:28:
../glib.git/glib/gmarkup.c: In function ‘unescape_gstring_inplace’:
../glib.git/glib/gmarkup.c:789:30: error: comparison of integer expressions of different signedness: ‘long int’ and ‘gsize’ {aka ‘long unsigned int’} [-Werror=sign-compare]
g_assert (to - string->str <= string->len);
^~
../glib.git/glib/gmacros.h:455:25: note: in definition of macro ‘G_LIKELY’
#define G_LIKELY(expr) (expr)
^~~~
../glib.git/glib/gmarkup.c:789:3: note: in expansion of macro ‘g_assert’
g_assert (to - string->str <= string->len);
^~~~~~~~
../glib.git/glib/gmarkup.c:790:24: error: comparison of integer expressions of different signedness: ‘long int’ and ‘gsize’ {aka ‘long unsigned int’} [-Werror=sign-compare]
if (to - string->str != string->len)
^~
../glib.git/glib/gmarkup.c: In function ‘g_markup_parse_boolean’:
../glib.git/glib/gmarkup.c:2634:17: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Werror=sign-compare]
for (i = 0; i < G_N_ELEMENTS (falses); i++)
^
../glib.git/glib/gmarkup.c:2645:17: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Werror=sign-compare]
for (i = 0; i < G_N_ELEMENTS (trues); i++)
^
glib/gquark.c: In function ‘g_quark_to_string’:
glib/gquark.c:268:13: error: comparison of integer expressions of different signedness: ‘GQuark’ {aka ‘unsigned int’} and ‘gint’ {aka ‘int’} [-Werror=sign-compare]
if (quark < seq_id)
^
glib/gprimes.c: In function ‘g_spaced_primes_closest’:
glib/gprimes.c:91:17: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’ [-Werror=sign-compare]
for (i = 0; i < G_N_ELEMENTS (g_primes); i++)
^
glib/gmappedfile.c: In function ‘mapped_file_new_from_fd’:
glib/gmappedfile.c:153:18: error: comparison of integer expressions of different signedness: ‘__off_t’ {aka ‘long int’} and ‘long unsigned int’ [-Werror=sign-compare]
if (st.st_size > G_MAXSIZE)
^
In file included from glib/glibconfig.h:9,
from glib/gtypes.h:32,
from glib/gquark.h:32,
from glib/gerror.h:28,
from glib/gconvert.h:32,
from glib/giochannel.h:32,
from glib/giochannel.c:37:
glib/giochannel.c: In function ‘g_io_channel_write_chars’:
glib/gmacros.h:351:26: error: comparison of integer expressions of different signedness: ‘gsize’ {aka ‘long unsigned int’} and ‘gssize’ {aka ‘long int’} [-Werror=sign-compare]
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
^
glib/giochannel.c:2285:31: note: in expansion of macro ‘MIN’
gssize write_this = MIN (space_in_buf, count - wrote_bytes);
^~~
glib/gmacros.h:351:41: error: operand of ?: changes signedness from ‘gssize’ {aka ‘long int’} to ‘gsize’ {aka ‘long unsigned int’} due to unsignedness of other operand [-Werror=sign-compare]
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
^~~
glib/giochannel.c:2285:31: note: in expansion of macro ‘MIN’
gssize write_this = MIN (space_in_buf, count - wrote_bytes);
^~~
glib/giochannel.c:2415:41: error: comparison of integer expressions of different signedness: ‘gssize’ {aka ‘long int’} and ‘gsize’ {aka ‘long unsigned int’} [-Werror=sign-compare]
g_assert (count == from_buf_len - from_buf_old_len);
^~
glib/gmacros.h:455:25: note: in definition of macro ‘G_LIKELY’
#define G_LIKELY(expr) (expr)
^~~~
glib/giochannel.c:2415:25: note: in expansion of macro ‘g_assert’
g_assert (count == from_buf_len - from_buf_old_len);
^~~~~~~~
Just skip the test if the unix transport isn’t supported. This means we
get better compilation coverage, and more explicit TAP output saying
that the test is being skipped on unsupported platforms.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
The specification doesn’t explicitly say this, but it doesn’t say
otherwise, and it would be pretty weird to have an empty transport name
or key.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
No need for the `meaningless` label and some unreachable if-branches.
This introduces no functional changes.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
This is not new; all of its methods have been deprecated for a long
time. Make the deprecation more obvious, however, by marking the whole
section as deprecated.
Note that GArray can’t *quite* do everything that GValueArray could.
See #1069 for work to fix this. This documentation block can be updated
again once that’s fixed.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
It would be nice if docs.c eventually went away — it’s more maintainable
for documentation comments to be next to the definition of the symbols
they document.
Move a few from docs.c, based on what I’ve been modifying recently.
The documentation comments are unchanged apart from fixing an argument
name for G_ALIGNOF.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
While gtk-doc can currently detect a link to a symbol which has been
pluralised by adding ‘s’, it can’t detect when ‘es’ is added. While
that’s being fixed, reword the documentation so the links are generated
correctly anyway.
gtk-doc fix here: https://gitlab.gnome.org/GNOME/gtk-doc/merge_requests/22
Signed-off-by: Philip Withnall <withnall@endlessm.com>
As pointed out by gtk-doc, these are all symbols which have been marked
as deprecated, but which aren’t protected by a deprecation guard. We
can’t use G_DEPRECATED_IN_* for them, as they are all non-function
symbols. Instead, wrap them in #ifndef G_DISABLE_DEPRECATED.
In some cases, we also need to wrap one or two functions which use the
deprecated types in G_DISABLE_DEPRECATED too.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
dep-list.c isn’t generated, but contains non-documentation gtk-doc-style
comments which are probably better left in place, since the code is
partially external to GLib.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
In cross-compilation environments the runtime check isn't possible so it is up
to the builder to seed the cross file, but we can definitely state that strlcpy
doesn't exist with a build test.
It isn't always obvious how and where to use these. Where possible I've
chosen real examples from GLib, preferring simple examples that
developers considering using these macros have hopefully already seen.
Signed-off-by: Simon McVittie <smcv@collabora.com>
If using the --interface-info-{body,header} options to gdbus-codegen,
and the first interface to be outputted has no methods, but does have
properties or signals, an uninitialised variable would be used for the
property/signal ‘since’ values.
In other situations, the ‘since’ value for a prior method would have
been incorrectly used for the properties/signals.
Signed-off-by: Philip Withnall <withnall@endlessm.com>