sre-save.c:114:1: warning: 'swap_with_size' defined but not used [-Wunused-function]
authorJay Krell <jaykrell@microsoft.com>
Thu, 13 Jun 2019 08:29:45 +0000 (01:29 -0700)
committerLarry Ewing <lewing@microsoft.com>
Tue, 18 Jun 2019 02:53:08 +0000 (21:53 -0500)
 swap_with_size (char *dest, const char* val, int len, int nelem) {

Commit migrated from https://github.com/mono/mono/commit/267a75f3656418c84eef65df653bda5b5843ee37

src/mono/mono/metadata/sre-save.c

index a4787ee..2beea38 100644 (file)
@@ -106,6 +106,7 @@ find_index_in_table (MonoDynamicImage *assembly, int table_idx, int col, guint32
        return 0;
 }
 
+#if G_BYTE_ORDER != G_LITTLE_ENDIAN
 /*
  * Copy len * nelem bytes from val to dest, swapping bytes to LE if necessary.
  * dest may be misaligned.
@@ -151,6 +152,7 @@ swap_with_size (char *dest, const char* val, int len, int nelem) {
        memcpy (dest, val, len * nelem);
 #endif
 }
+#endif
 
 static guint32
 add_mono_string_to_blob_cached (MonoDynamicImage *assembly, MonoString *str)