summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-12-13 11:47:32 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-12-13 11:47:32 (GMT)
commit172e4500f60a8a9d4bcc8eef617d6c80bcc87d0e (patch)
treef9feede4fe89cae95be6ff2beabd556bbffa91a0 /plugins
parent73d58a38c5847f54aa9458b3612ffd35b7372dc9 (diff)
Fixed some compilation warnings.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mobicore/mclf-int.c29
1 files changed, 10 insertions, 19 deletions
diff --git a/plugins/mobicore/mclf-int.c b/plugins/mobicore/mclf-int.c
index 609000c..16d16be 100644
--- a/plugins/mobicore/mclf-int.c
+++ b/plugins/mobicore/mclf-int.c
@@ -44,6 +44,7 @@ bool read_mclf_header(GMCLFFormat *format, mclf_header_t *header, SourceEndian e
bool result; /* Bilan à retourner */
GBinContent *content; /* Contenu binaire à lire */
vmpa2t pos; /* Position de lecture */
+ uint32_t tmp; /* Espace de transition */
content = G_BIN_FORMAT(format)->content;
@@ -52,41 +53,31 @@ bool read_mclf_header(GMCLFFormat *format, mclf_header_t *header, SourceEndian e
result = g_binary_content_read_u32(content, &pos, endian, &header->intro.magic);
result &= g_binary_content_read_u32(content, &pos, endian, &header->intro.version);
- printf("Version :: %u (%x)\n", header->intro.version, header->intro.version);
-
-
result &= g_binary_content_read_u32(content, &pos, endian, &header->v1.flags);
- result &= g_binary_content_read_u32(content, &pos, endian, &header->v1.mem_type);
- result &= g_binary_content_read_u32(content, &pos, endian, &header->v1.service_type);
- printf("Mem type : 0x%08x\n", header->v1.mem_type);
+ result &= g_binary_content_read_u32(content, &pos, endian, &tmp);
+ header->v1.mem_type = tmp;
+
+ result &= g_binary_content_read_u32(content, &pos, endian, &tmp);
+ header->v1.service_type = tmp;
result &= g_binary_content_read_u32(content, &pos, endian, &header->v1.num_instances);
result &= g_binary_content_read_raw(content, &pos, 16, (bin_t *)&header->v1.uuid);
- result &= g_binary_content_read_u32(content, &pos, endian, &header->v1.driver_id);
- result &= g_binary_content_read_u32(content, &pos, endian, &header->v1.num_threads);
- printf("Num threads : 0x%08x\n", header->v1.num_threads);
+ result &= g_binary_content_read_u32(content, &pos, endian, &tmp);
+ header->v1.driver_id = tmp;
- result &= read_mclf_segment_desc(format, &header->v1.text, &pos, endian);
+ result &= g_binary_content_read_u32(content, &pos, endian, &header->v1.num_threads);
- printf("TEXT :: 0x%08x + %u\n", header->v1.text.start, header->v1.text.len);
+ result &= read_mclf_segment_desc(format, &header->v1.text, &pos, endian);
result &= read_mclf_segment_desc(format, &header->v1.data, &pos, endian);
- printf("DATA :: 0x%08x + %u\n", header->v1.data.start, header->v1.data.len);
-
-
result &= g_binary_content_read_u32(content, &pos, endian, &header->v1.bss_len);
result &= g_binary_content_read_u32(content, &pos, endian, &header->v1.entry);
- printf("ENTRY :: 0x%08x\n", header->v1.entry);
-
-
-
result &= g_binary_content_read_u32(content, &pos, endian, &header->v2.service_version);
-
return result;
}