Avoid GCC warnings from ADC_CMDCOM.
authorfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Wed, 11 Apr 2007 02:54:36 +0000 (02:54 +0000)
committerfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Wed, 11 Apr 2007 02:54:36 +0000 (02:54 +0000)
git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@881 959494ce-11ee-0310-bf91-de5d638817bd

daemon/fnet-adc.c

index 7f5722b..a72935b 100644 (file)
@@ -192,7 +192,15 @@ static void freeqcmd(struct qcmd *qcmd)
 }
 
 #define ADC_CMDFN(name) static void name(struct fnetnode *fn, wchar_t *command, wchar_t *sender, int argc, wchar_t **argv)
-#define ADC_CMDCOM struct socket *sk = fn->sk; struct adchub *hub = fn->data;
+#ifdef __GNUC__
+#define ADC_CMDCOM \
+       struct socket *sk __attribute__ ((unused)) = fn->sk; \
+       struct adchub *hub __attribute__ ((unused)) = fn->data;
+#else
+#define ADC_CMDCOM \
+       struct socket *sk = fn->sk; \
+       struct adchub *hub = fn->data;
+#endif
 
 ADC_CMDFN(cmd_sup)
 {