diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2020-10-20 21:44:30 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2020-10-20 21:44:30 (GMT) |
commit | e8009661bc2a647678b944a09ee3a7e218692e44 (patch) | |
tree | 133934e85bf05314dadd8654ed0fb344cf5732d2 /src/analysis/routine.c | |
parent | 43b19e1c8e902e6e96a5ca912497268a19255ac5 (diff) |
Fixed some compilation warnings.
Diffstat (limited to 'src/analysis/routine.c')
-rw-r--r-- | src/analysis/routine.c | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/src/analysis/routine.c b/src/analysis/routine.c index 422e7de..99f1b28 100644 --- a/src/analysis/routine.c +++ b/src/analysis/routine.c @@ -868,25 +868,32 @@ char *g_binary_routine_to_string(const GBinRoutine *routine, bool include) else if (routine->name != NULL) name = routine->name; - switch (routine->type) - { - case RTT_CONSTRUCTOR: - result = stradd(result, name); - result = stradd(result, routine->ns_sep); - result = stradd(result, name); - break; + else + name = NULL; - case RTT_DESTRUCTOR: - result = stradd(result, name); - result = stradd(result, routine->ns_sep); - result = stradd(result, "~"); - result = stradd(result, name); - break; + if (name != NULL) + { + switch (routine->type) + { + case RTT_CONSTRUCTOR: + result = stradd(result, name); + result = stradd(result, routine->ns_sep); + result = stradd(result, name); + break; + + case RTT_DESTRUCTOR: + result = stradd(result, name); + result = stradd(result, routine->ns_sep); + result = stradd(result, "~"); + result = stradd(result, name); + break; + + default: /* Pour gcc */ + case RTT_CLASSIC: + result = stradd(result, name); + break; - default: /* Pour gcc */ - case RTT_CLASSIC: - result = stradd(result, name); - break; + } } |