mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-08 18:36:17 +01:00
Merge branch 'warning-fixes' into 'master'
Some minor clang warning fixes See merge request GNOME/glib!1384
This commit is contained in:
commit
cf72043ade
@ -22,6 +22,7 @@
|
||||
#include <gio/gio.h>
|
||||
#include <gio/gunixinputstream.h>
|
||||
#include <gio/gunixoutputstream.h>
|
||||
#include <glib.h>
|
||||
#include <glib/glib-unix.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
@ -29,7 +30,8 @@
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#define DATA "abcdefghijklmnopqrstuvwxyz"
|
||||
/* sizeof(DATA) will give the number of bytes in the array, plus the terminating nul */
|
||||
static const gchar DATA[] = "abcdefghijklmnopqrstuvwxyz";
|
||||
|
||||
int writer_pipe[2], reader_pipe[2];
|
||||
GCancellable *writer_cancel, *reader_cancel, *main_cancel;
|
||||
@ -118,8 +120,8 @@ reader_thread (gpointer user_data)
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
char main_buf[sizeof (DATA)];
|
||||
gssize main_len, main_offset;
|
||||
static char main_buf[sizeof (DATA)];
|
||||
static gssize main_len, main_offset;
|
||||
|
||||
static void main_thread_read (GObject *source, GAsyncResult *res, gpointer user_data);
|
||||
static void main_thread_skipped (GObject *source, GAsyncResult *res, gpointer user_data);
|
||||
|
@ -180,6 +180,7 @@ test_g_main_context_pusher (void)
|
||||
if (TRUE)
|
||||
{
|
||||
g_autoptr(GMainContextPusher) val = g_main_context_pusher_new (context);
|
||||
g_assert_nonnull (val);
|
||||
|
||||
/* Check it’s now the thread-default main context */
|
||||
g_assert_true (g_main_context_get_thread_default () == context);
|
||||
|
@ -77,6 +77,7 @@ test_autoptr (void)
|
||||
|
||||
{
|
||||
g_autoptr (TestAutoCleanup) tac = tac_ptr;
|
||||
g_assert_nonnull (tac);
|
||||
}
|
||||
#ifdef __GNUC__
|
||||
g_assert_null (tac_ptr);
|
||||
|
Loading…
Reference in New Issue
Block a user