Skip to main content
summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorDidier Brachet2014-07-04 04:08:18 -0400
committerDidier Brachet2014-07-04 04:08:18 -0400
commitd4cd3a67ecefb54b82cd8434fb1ba37b8ab31752 (patch)
treee85267d8a01907aa99e332470e0ffbc77ffd945e /server
parent82dbca7dda9a01d95154927d953ac9f671ef70a4 (diff)
downloadorg.eclipse.tcf.agent-d4cd3a67ecefb54b82cd8434fb1ba37b8ab31752.tar.gz
org.eclipse.tcf.agent-d4cd3a67ecefb54b82cd8434fb1ba37b8ab31752.tar.xz
org.eclipse.tcf.agent-d4cd3a67ecefb54b82cd8434fb1ba37b8ab31752.zip
TCF Agent: Bug 438903 - Removed build warnings if some services are not included
Diffstat (limited to 'server')
-rw-r--r--server/tcf/main/server.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/server/tcf/main/server.c b/server/tcf/main/server.c
index 65ad3810..2dbe2dbc 100644
--- a/server/tcf/main/server.c
+++ b/server/tcf/main/server.c
@@ -68,9 +68,17 @@ static void channel_redirection_listener(Channel * host, Channel * target) {
}
if (target->state == ChannelStateConnected) {
int i;
+#if SERVICE_LineNumbers
int service_ln = 0;
+#endif
+#if SERVICE_PathMap
+# if ENABLE_DebugContext && ENABLE_ContextProxy
int service_pm = 0;
+# endif
+#endif
+#if SERVICE_Symbols
int service_sm = 0;
+#endif
#if SERVICE_Disassembly
int service_da = 0;
#endif
@@ -79,9 +87,21 @@ static void channel_redirection_listener(Channel * host, Channel * target) {
#endif
for (i = 0; i < target->peer_service_cnt; i++) {
char * nm = target->peer_service_list[i];
+ /* Added this line to avoid build warnings if none of the
+ * services below are defined (note that nm may be used
+ * in TARGET_SERVICE_CHECK_HOOK() macro). */
+ if (nm);
+#if SERVICE_LineNumbers
if (strcmp(nm, "LineNumbers") == 0) service_ln = 1;
+#endif
+#if SERVICE_Symbols
if (strcmp(nm, "Symbols") == 0) service_sm = 1;
+#endif
+#if SERVICE_PathMap
+# if ENABLE_DebugContext && ENABLE_ContextProxy
if (strcmp(nm, "PathMap") == 0) service_pm = 1;
+# endif
+#endif
#if SERVICE_Disassembly
if (strcmp(nm, "Disassembly") == 0) service_da = 1;
#endif

Back to the top