[asterisk-addons-commits] qwell: trunk r588 - in /trunk: Makefile apps/app_fax.c

SVN commits to the Asterisk addons project asterisk-addons-commits at lists.digium.com
Mon May 5 11:11:11 CDT 2008


Author: qwell
Date: Mon May  5 11:11:10 2008
New Revision: 588

URL: http://svn.digium.com/view/asterisk-addons?view=rev&rev=588
Log:
Make --enable-dev-mode actually work.

Fix app_fax build to not give warnings (which are errors when dev-mode actually works).

(closes issue #12579)
Reported by: IgorG
Patches:
      addons_dev_mode.v2.diff uploaded by IgorG (license 20)

Modified:
    trunk/Makefile
    trunk/apps/app_fax.c

Modified: trunk/Makefile
URL: http://svn.digium.com/view/asterisk-addons/trunk/Makefile?view=diff&rev=588&r1=587&r2=588
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Mon May  5 11:11:10 2008
@@ -28,10 +28,6 @@
 # Overwite config files on "make samples"
 OVERWRITE:=y
 
-ifeq ($(AST_DEVMODE),yes)
-  ASTCFLAGS+=-Werror -Wunused -Wundef $(AST_DECLARATION_AFTER_STATEMENT) -Wmissing-format-attribute -Wformat-security -Wformat=2
-endif
-
 # If the file .asteriskaddons.makeopts is present in your home directory, you can
 # include all of your favorite menuselect options so that every time you download
 # a new version of Asterisk-addons, you don't have to run menuselect to set them.
@@ -53,6 +49,10 @@
 
 ifneq ($(wildcard makeopts),)
   include makeopts
+endif
+
+ifeq ($(AST_DEVMODE),yes)
+  ASTCFLAGS+=-Werror -Wunused -Wundef $(AST_DECLARATION_AFTER_STATEMENT) -Wmissing-format-attribute -Wformat-security -Wformat=2
 endif
 
 ifeq ($(OSARCH),SunOS)

Modified: trunk/apps/app_fax.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/apps/app_fax.c?view=diff&rev=588&r1=587&r2=588
==============================================================================
--- trunk/apps/app_fax.c (original)
+++ trunk/apps/app_fax.c Mon May  5 11:11:10 2008
@@ -114,12 +114,13 @@
 
 static void span_message(int level, const char *msg)
 {
-	if (level == SPAN_LOG_ERROR)
-		ast_log(LOG_ERROR, msg);
-	else if (level == SPAN_LOG_WARNING)
-		ast_log(LOG_WARNING, msg);
-	else
-		ast_log(LOG_DEBUG, msg);
+	if (level == SPAN_LOG_ERROR) {
+		ast_log(LOG_ERROR, "%s", msg);
+	} else if (level == SPAN_LOG_WARNING) {
+		ast_log(LOG_WARNING, "%s", msg);
+	} else {
+		ast_log(LOG_DEBUG, "%s", msg);
+	}
 }
 
 static int t38_tx_packet_handler(t38_core_state_t *s, void *user_data, const uint8_t *buf, int len, int count)
@@ -302,16 +303,11 @@
 	int res = -1;
 	int original_read_fmt = AST_FORMAT_SLINEAR;
 	int original_write_fmt = AST_FORMAT_SLINEAR;
-	int len;
-	int samples;
 	fax_state_t fax;
 	struct ast_dsp *dsp = NULL;
 	int detect_tone = 0;
 	struct ast_frame *inf = NULL;
-	struct ast_frame outf;
 	struct ast_frame *fr;
-	uint8_t buffer[AST_FRIENDLY_OFFSET + MAX_SAMPLES * sizeof(uint16_t)];
-	int16_t *buf = (int16_t *) (buffer + AST_FRIENDLY_OFFSET);
 	int last_state = 0;
 	struct timeval now, start, state_change;
 	enum ast_control_t38 t38control;
@@ -475,8 +471,6 @@
 static int transmit_t38(fax_session *s)
 {
 	int res = 0;
-	int len;
-	int samples;
 	t38_terminal_state_t t38;
 	struct ast_frame *inf = NULL;
 	int last_state = 0;




More information about the asterisk-addons-commits mailing list