]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix a "set but not used" warning on newer gccs.
authorMark Michelson <mmichelson@digium.com>
Thu, 8 Nov 2012 21:56:49 +0000 (21:56 +0000)
committerMark Michelson <mmichelson@digium.com>
Thu, 8 Nov 2012 21:56:49 +0000 (21:56 +0000)
Turns out the "helpful" setting of ms and res in this
macro is completely useless after the timeout antipattern
fix.

If you're a new guy looking to write code, don't write
a macro like this one.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@376087 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_fax.c

index 6a96cbe109a74da90bd36e674e66bb4364b8c3f0..fadbbe6ec40ae75bd0d303b72113965295a7be97 100644 (file)
@@ -1018,7 +1018,6 @@ static void set_channel_variables(struct ast_channel *chan, struct ast_fax_sessi
 #define GENERIC_FAX_EXEC_ERROR_QUIET(fax, chan, errorstr, reason) \
        do {    \
                GENERIC_FAX_EXEC_SET_VARS(fax, chan, errorstr, reason); \
-               res = ms = -1; \
        } while (0)
 
 #define GENERIC_FAX_EXEC_ERROR(fax, chan, errorstr, reason)    \
@@ -1156,7 +1155,7 @@ static int generic_fax_exec(struct ast_channel *chan, struct ast_fax_session_det
 {
        int ms;
        int timeout = RES_FAX_TIMEOUT;
-       int res, chancount;
+       int chancount;
        unsigned int expected_frametype = -1;
        union ast_frame_subclass expected_framesubclass = { .integer = -1 };
        unsigned int t38negotiated = (ast_channel_get_t38_state(chan) == T38_STATE_NEGOTIATED);