mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-09 04:15:49 +01:00
fix a few warnings on non-Linux
mostly #ifdeffing functions that are only called by #ifdeffed code
This commit is contained in:
parent
afa82ae805
commit
749fa587bc
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "gsocketaddress.h"
|
#include "gsocketaddress.h"
|
||||||
#include "ginetaddress.h"
|
#include "ginetaddress.h"
|
||||||
|
@ -479,7 +479,9 @@ _xdg_mime_magic_parse_magic_line (FILE *magic_file,
|
|||||||
/* We clean up the matchlet, byte swapping if needed */
|
/* We clean up the matchlet, byte swapping if needed */
|
||||||
if (matchlet->word_size > 1)
|
if (matchlet->word_size > 1)
|
||||||
{
|
{
|
||||||
|
#if LITTLE_ENDIAN
|
||||||
int i;
|
int i;
|
||||||
|
#endif
|
||||||
if (matchlet->value_length % matchlet->word_size != 0)
|
if (matchlet->value_length % matchlet->word_size != 0)
|
||||||
{
|
{
|
||||||
_xdg_mime_magic_matchlet_free (matchlet);
|
_xdg_mime_magic_matchlet_free (matchlet);
|
||||||
|
@ -1014,7 +1014,10 @@ write_to_temp_file (const gchar *contents,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef BTRFS_SUPER_MAGIC
|
||||||
no_fsync:
|
no_fsync:
|
||||||
|
#endif
|
||||||
|
|
||||||
errno = 0;
|
errno = 0;
|
||||||
if (fclose (file) == EOF)
|
if (fclose (file) == EOF)
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#ifdef __linux
|
||||||
static void
|
static void
|
||||||
test_platform_argv0 (void)
|
test_platform_argv0 (void)
|
||||||
{
|
{
|
||||||
@ -45,6 +46,7 @@ test_platform_argv0 (void)
|
|||||||
g_assert (strcmp (g_get_prgname(), "option-argv0") == 0
|
g_assert (strcmp (g_get_prgname(), "option-argv0") == 0
|
||||||
|| strcmp (g_get_prgname (), "lt-option-argv0") == 0);
|
|| strcmp (g_get_prgname (), "lt-option-argv0") == 0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc,
|
main (int argc,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user