summaryrefslogtreecommitdiff
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
parent73d58a38c5847f54aa9458b3612ffd35b7372dc9 (diff)
Fixed some compilation warnings.
-rw-r--r--ChangeLog6
-rw-r--r--plugins/mobicore/mclf-int.c29
-rw-r--r--src/main.c2
3 files changed, 17 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index d8d3c14..41da548 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
16-12-13 Cyrille Bagard <nocbos@gmail.com>
+ * plugins/mobicore/mclf-int.c:
+ * src/main.c:
+ Fix some compilation warnings.
+
+16-12-13 Cyrille Bagard <nocbos@gmail.com>
+
* plugins/mobicore/annotations.c:
* plugins/readdex/class.c:
* plugins/readdex/code.c:
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;
}
diff --git a/src/main.c b/src/main.c
index 14fa1b4..2af8bf9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -31,6 +31,7 @@
#include "analysis/project.h"
#include "analysis/db/server.h"
+#include "common/xdg.h"
#include "core/core.h"
#include "core/params.h"
#include "glibext/delayed.h"
@@ -190,7 +191,6 @@ int main(int argc, char **argv)
pub = get_xdg_config_dir("chrysalide" G_DIR_SEPARATOR_S "id_rsa.pub");
-
server = g_db_server_new_internal(author, pub);
g_db_server_start(server);