[asterisk-commits] tilghman: branch tilghman/ast_str_opaque r159856 - in /team/tilghman/ast_str_...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Nov 29 12:41:40 CST 2008


Author: tilghman
Date: Sat Nov 29 12:41:39 2008
New Revision: 159856

URL: http://svn.digium.com/view/asterisk?view=rev&rev=159856
Log:
Merged revisions 159818,159853 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r159818 | kpfleming | 2008-11-29 11:57:39 -0600 (Sat, 29 Nov 2008) | 18 lines
  
  incorporates r159808 from branches/1.4:
  ------------------------------------------------------------------------
  r159808 | kpfleming | 2008-11-29 10:58:29 -0600 (Sat, 29 Nov 2008) | 7 lines
  
  update dev-mode compiler flags to match the ones used by default on Ubuntu Intrepid, so all developers will see the same warnings and errors
  
  since this branch already had some printf format attributes, enable checking for them and tag functions that didn't have them
  
  format attributes in a consistent way
  
  
  ------------------------------------------------------------------------
  
  in addition:
  
  move some format attributes from main/utils.c to the header files they belong in, and fix up references to the relevant functions based on new compiler warnings
........
  r159853 | tilghman | 2008-11-29 12:33:18 -0600 (Sat, 29 Nov 2008) | 2 lines
  
  Allow the '#' sign to exist within an extension (inspired by issue #13330)
........

Modified:
    team/tilghman/ast_str_opaque/   (props changed)
    team/tilghman/ast_str_opaque/Makefile
    team/tilghman/ast_str_opaque/apps/app_readexten.c
    team/tilghman/ast_str_opaque/cdr/cdr_tds.c
    team/tilghman/ast_str_opaque/channels/chan_agent.c
    team/tilghman/ast_str_opaque/channels/chan_iax2.c
    team/tilghman/ast_str_opaque/channels/chan_misdn.c
    team/tilghman/ast_str_opaque/channels/chan_sip.c
    team/tilghman/ast_str_opaque/channels/chan_vpb.cc
    team/tilghman/ast_str_opaque/configure
    team/tilghman/ast_str_opaque/configure.ac
    team/tilghman/ast_str_opaque/include/asterisk/astmm.h
    team/tilghman/ast_str_opaque/include/asterisk/channel.h
    team/tilghman/ast_str_opaque/include/asterisk/cli.h
    team/tilghman/ast_str_opaque/include/asterisk/compat.h
    team/tilghman/ast_str_opaque/include/asterisk/config.h
    team/tilghman/ast_str_opaque/include/asterisk/devicestate.h
    team/tilghman/ast_str_opaque/include/asterisk/dlinkedlists.h
    team/tilghman/ast_str_opaque/include/asterisk/dundi.h
    team/tilghman/ast_str_opaque/include/asterisk/enum.h
    team/tilghman/ast_str_opaque/include/asterisk/linkedlists.h
    team/tilghman/ast_str_opaque/include/asterisk/lock.h
    team/tilghman/ast_str_opaque/include/asterisk/logger.h
    team/tilghman/ast_str_opaque/include/asterisk/manager.h
    team/tilghman/ast_str_opaque/include/asterisk/module.h
    team/tilghman/ast_str_opaque/include/asterisk/res_odbc.h
    team/tilghman/ast_str_opaque/include/asterisk/stringfields.h
    team/tilghman/ast_str_opaque/include/asterisk/strings.h
    team/tilghman/ast_str_opaque/include/asterisk/utils.h
    team/tilghman/ast_str_opaque/include/jitterbuf.h
    team/tilghman/ast_str_opaque/main/ast_expr2.c
    team/tilghman/ast_str_opaque/main/dns.c
    team/tilghman/ast_str_opaque/main/event.c
    team/tilghman/ast_str_opaque/main/features.c
    team/tilghman/ast_str_opaque/main/logger.c
    team/tilghman/ast_str_opaque/main/srv.c
    team/tilghman/ast_str_opaque/main/strings.c
    team/tilghman/ast_str_opaque/main/utils.c
    team/tilghman/ast_str_opaque/main/xmldoc.c
    team/tilghman/ast_str_opaque/makeopts.in
    team/tilghman/ast_str_opaque/utils/astman.c
    team/tilghman/ast_str_opaque/utils/check_expr.c
    team/tilghman/ast_str_opaque/utils/conf2ael.c
    team/tilghman/ast_str_opaque/utils/extconf.c
    team/tilghman/ast_str_opaque/utils/frame.c

Propchange: team/tilghman/ast_str_opaque/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/tilghman/ast_str_opaque/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat Nov 29 12:41:39 2008
@@ -1,1 +1,1 @@
-/trunk:1-159801
+/trunk:1-159854

Modified: team/tilghman/ast_str_opaque/Makefile
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/Makefile?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/Makefile (original)
+++ team/tilghman/ast_str_opaque/Makefile Sat Nov 29 12:41:39 2008
@@ -237,7 +237,13 @@
 ASTCFLAGS+=-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
 
 ifeq ($(AST_DEVMODE),yes)
-  ASTCFLAGS+=-Werror -Wunused -Wundef $(AST_DECLARATION_AFTER_STATEMENT) -Wmissing-format-attribute -Wformat=2
+  ASTCFLAGS+=-Werror
+  ASTCFLAGS+=-Wunused
+  ASTCFLAGS+=$(AST_DECLARATION_AFTER_STATEMENT)
+  ASTCFLAGS+=$(AST_FORTIFY_SOURCE)
+  ASTCFLAGS+=-Wundef 
+  ASTCFLAGS+=-Wmissing-format-attribute
+  ASTCFLAGS+=-Wformat=2
 endif
 
 ifneq ($(findstring BSD,$(OSARCH)),)

Modified: team/tilghman/ast_str_opaque/apps/app_readexten.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/apps/app_readexten.c?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/apps/app_readexten.c (original)
+++ team/tilghman/ast_str_opaque/apps/app_readexten.c Sat Nov 29 12:41:39 2008
@@ -224,12 +224,13 @@
 					status = "TIMEOUT";
 				}
 				break;
-			} else if (res == '#') {
-				break;
 			}
 
 			exten[x] = res;
 			if (!ast_matchmore_extension(chan, arglist.context, exten, 1 /* priority */, chan->cid.cid_num)) {
+				if (!ast_exists_extension(chan, arglist.context, exten, 1, chan->cid.cid_num) && res == '#') {
+					exten[x] = '\0';
+				}
 				break;
 			}
 		}

Modified: team/tilghman/ast_str_opaque/cdr/cdr_tds.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/cdr/cdr_tds.c?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/cdr/cdr_tds.c (original)
+++ team/tilghman/ast_str_opaque/cdr/cdr_tds.c Sat Nov 29 12:41:39 2008
@@ -103,7 +103,7 @@
 static void get_date(char *, size_t len, struct timeval);
 
 static int execute_and_consume(DBPROCESS *dbproc, const char *fmt, ...)
-	__attribute__ ((format (printf, 2, 3)));
+	__attribute__((format(printf, 2, 3)));
 
 static int mssql_connect(void);
 static int mssql_disconnect(void);

Modified: team/tilghman/ast_str_opaque/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/channels/chan_agent.c?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/channels/chan_agent.c (original)
+++ team/tilghman/ast_str_opaque/channels/chan_agent.c Sat Nov 29 12:41:39 2008
@@ -1106,7 +1106,7 @@
 	}
 #endif	
 	if (p->pending)
-		tmp = ast_channel_alloc(0, state, 0, 0, "", p->chan ? p->chan->exten:"", p->chan ? p->chan->context:"", 0, "Agent/P%s-%d", p->agent, ast_random() & 0xffff);
+		tmp = ast_channel_alloc(0, state, 0, 0, "", p->chan ? p->chan->exten:"", p->chan ? p->chan->context:"", 0, "Agent/P%s-%d", p->agent, (int) ast_random() & 0xffff);
 	else
 		tmp = ast_channel_alloc(0, state, 0, 0, "", p->chan ? p->chan->exten:"", p->chan ? p->chan->context:"", 0, "Agent/%s", p->agent);
 	if (!tmp) {

Modified: team/tilghman/ast_str_opaque/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/channels/chan_iax2.c?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/channels/chan_iax2.c (original)
+++ team/tilghman/ast_str_opaque/channels/chan_iax2.c Sat Nov 29 12:41:39 2008
@@ -979,7 +979,7 @@
 	ast_log(LOG_WARNING, "%s", data);
 }
 
-static void __attribute__((format (printf, 1, 2))) jb_error_output(const char *fmt, ...)
+static void __attribute__((format(printf, 1, 2))) jb_error_output(const char *fmt, ...)
 {
 	va_list args;
 	char buf[1024];
@@ -991,7 +991,7 @@
 	ast_log(LOG_ERROR, "%s", buf);
 }
 
-static void __attribute__((format (printf, 1, 2))) jb_warning_output(const char *fmt, ...)
+static void __attribute__((format(printf, 1, 2))) jb_warning_output(const char *fmt, ...)
 {
 	va_list args;
 	char buf[1024];
@@ -1003,7 +1003,7 @@
 	ast_log(LOG_WARNING, "%s", buf);
 }
 
-static void __attribute__((format (printf, 1, 2))) jb_debug_output(const char *fmt, ...)
+static void __attribute__((format(printf, 1, 2))) jb_debug_output(const char *fmt, ...)
 {
 	va_list args;
 	char buf[1024];

Modified: team/tilghman/ast_str_opaque/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/channels/chan_misdn.c?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/channels/chan_misdn.c (original)
+++ team/tilghman/ast_str_opaque/channels/chan_misdn.c Sat Nov 29 12:41:39 2008
@@ -285,7 +285,7 @@
 static int *misdn_ports;
 
 static void chan_misdn_log(int level, int port, char *tmpl, ...)
-	__attribute__ ((format (printf, 3, 4)));
+	__attribute__((format(printf, 3, 4)));
 
 static struct ast_channel *misdn_new(struct chan_list *cl, int state,  char *exten, char *callerid, int format, int port, int c);
 static void send_digit_to_chan(struct chan_list *cl, char digit );

Modified: team/tilghman/ast_str_opaque/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/channels/chan_sip.c?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/channels/chan_sip.c (original)
+++ team/tilghman/ast_str_opaque/channels/chan_sip.c Sat Nov 29 12:41:39 2008
@@ -2895,7 +2895,7 @@
 };
 
 static void append_history_full(struct sip_pvt *p, const char *fmt, ...)
-	__attribute__ ((format (printf, 2, 3)));
+	__attribute__((format(printf, 2, 3)));
 
 
 /*! \brief Convert transfer status to string */
@@ -3206,9 +3206,9 @@
 
 	/* z9hG4bK is a magic cookie.  See RFC 3261 section 8.1.1.7 */
 	ast_string_field_build(p, via, "SIP/2.0/%s %s:%d;branch=z9hG4bK%08x%s",
-			get_transport_pvt(p),
-			ast_inet_ntoa(p->ourip.sin_addr),
-			ntohs(p->ourip.sin_port), p->branch, rport);
+			       get_transport_pvt(p),
+			       ast_inet_ntoa(p->ourip.sin_addr),
+			       ntohs(p->ourip.sin_port), (int) p->branch, rport);
 }
 
 /*! \brief NAT fix - decide which IP address to use for Asterisk server?
@@ -3269,7 +3269,7 @@
 }
 
 /*! \brief Append to SIP dialog history with arg list  */
-static __attribute__((format (printf, 2, 0))) void append_history_va(struct sip_pvt *p, const char *fmt, va_list ap)
+static __attribute__((format(printf, 2, 0))) void append_history_va(struct sip_pvt *p, const char *fmt, va_list ap)
 {
 	char buf[80], *c = buf; /* max history length */
 	struct sip_history *hist;

Modified: team/tilghman/ast_str_opaque/channels/chan_vpb.cc
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/channels/chan_vpb.cc?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/channels/chan_vpb.cc (original)
+++ team/tilghman/ast_str_opaque/channels/chan_vpb.cc Sat Nov 29 12:41:39 2008
@@ -2478,7 +2478,7 @@
 	}
 	ast_verb(4, "%s: New call for context [%s]\n", me->dev, context);
 	    
-	tmp = ast_channel_alloc(1, state, 0, 0, "", me->ext, me->context, 0, me->dev);
+	tmp = ast_channel_alloc(1, state, 0, 0, "", me->ext, me->context, 0, "%s", me->dev);
 	if (tmp) {
 		if (use_ast_ind == 1){
 			tmp->tech = &vpb_tech_indicate;

Modified: team/tilghman/ast_str_opaque/configure.ac
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/configure.ac?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/configure.ac (original)
+++ team/tilghman/ast_str_opaque/configure.ac Sat Nov 29 12:41:39 2008
@@ -514,6 +514,16 @@
 	AST_DECLARATION_AFTER_STATEMENT=
 fi
 AC_SUBST(AST_DECLARATION_AFTER_STATEMENT)
+
+AC_MSG_CHECKING(for _FORTIFY_SOURCE support)
+if $(${CC} -D_FORTIFY_SOURCE=2 -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
+	AC_MSG_RESULT(yes)
+	AST_FORTIFY_SOURCE=-D_FORTIFY_SOURCE=2
+else
+	AC_MSG_RESULT(no)
+	AST_FORTIFY_SOURCE=
+fi
+AC_SUBST(AST_FORTIFY_SOURCE)
 
 AC_MSG_CHECKING(for -fno-strict-overflow)
 if $(${CC} -O2 -fno-strict-overflow -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then

Modified: team/tilghman/ast_str_opaque/include/asterisk/astmm.h
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/include/asterisk/astmm.h?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/include/asterisk/astmm.h (original)
+++ team/tilghman/ast_str_opaque/include/asterisk/astmm.h Sat Nov 29 12:41:39 2008
@@ -51,9 +51,9 @@
 char *__ast_strdup(const char *s, const char *file, int lineno, const char *func);
 char *__ast_strndup(const char *s, size_t n, const char *file, int lineno, const char *func);
 int __ast_asprintf(const char *file, int lineno, const char *func, char **strp, const char *format, ...)
-	__attribute__ ((format (printf, 5, 6)));
+	__attribute__((format(printf, 5, 6)));
 int __ast_vasprintf(char **strp, const char *format, va_list ap, const char *file, int lineno, const char *func)
-	__attribute__ ((format (printf, 2, 0)));
+	__attribute__((format(printf, 2, 0)));
 void __ast_mm_init(void);
 
 

Modified: team/tilghman/ast_str_opaque/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/include/asterisk/channel.h?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/include/asterisk/channel.h (original)
+++ team/tilghman/ast_str_opaque/include/asterisk/channel.h Sat Nov 29 12:41:39 2008
@@ -644,14 +644,14 @@
  * \deprecated You should use the ast_datastore_alloc() generic function instead.
  */
 struct ast_datastore *ast_channel_datastore_alloc(const struct ast_datastore_info *info, const char *uid)
-	__attribute__ ((deprecated));
+	__attribute__((deprecated));
 
 /*!
  * \brief Free a channel data store object
  * \deprecated You should use the ast_datastore_free() generic function instead.
  */
 int ast_channel_datastore_free(struct ast_datastore *datastore)
-	__attribute__ ((deprecated));
+	__attribute__((deprecated));
 
 /*! \brief Inherit datastores from a parent to a child. */
 int ast_channel_datastore_inherit(struct ast_channel *from, struct ast_channel *to);
@@ -702,7 +702,7 @@
  * \note By default, new channels are set to the "s" extension
  *       and "default" context.
  */
-struct ast_channel *ast_channel_alloc(int needqueue, int state, const char *cid_num, const char *cid_name, const char *acctcode, const char *exten, const char *context, const int amaflag, const char *name_fmt, ...);
+struct ast_channel *ast_channel_alloc(int needqueue, int state, const char *cid_num, const char *cid_name, const char *acctcode, const char *exten, const char *context, const int amaflag, const char *name_fmt, ...) __attribute__((format(printf, 9, 10)));
 
 /*! 
  * \brief Queue an outgoing frame 
@@ -921,7 +921,7 @@
  * is earlier than current time plus the offset, it returns 1, if the two
  * time values are equal, it return 0, otherwise, it return -1.
  */
-int ast_channel_cmpwhentohangup(struct ast_channel *chan, time_t offset) __attribute__ ((deprecated));
+int ast_channel_cmpwhentohangup(struct ast_channel *chan, time_t offset) __attribute__((deprecated));
 int ast_channel_cmpwhentohangup_tv(struct ast_channel *chan, struct timeval offset);
 
 /*! \brief Set when to hang a channel up 
@@ -936,7 +936,7 @@
  *
  * \return Nothing
  */
-void ast_channel_setwhentohangup(struct ast_channel *chan, time_t offset) __attribute__ ((deprecated));
+void ast_channel_setwhentohangup(struct ast_channel *chan, time_t offset) __attribute__((deprecated));
 void ast_channel_setwhentohangup_tv(struct ast_channel *chan, struct timeval offset);
 
 /*! 

Modified: team/tilghman/ast_str_opaque/include/asterisk/cli.h
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/include/asterisk/cli.h?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/include/asterisk/cli.h (original)
+++ team/tilghman/ast_str_opaque/include/asterisk/cli.h Sat Nov 29 12:41:39 2008
@@ -30,7 +30,7 @@
 #include "asterisk/linkedlists.h"
 
 void ast_cli(int fd, const char *fmt, ...)
-	__attribute__ ((format (printf, 2, 3)));
+	__attribute__((format(printf, 2, 3)));
 
 #define RESULT_SUCCESS		0
 #define RESULT_SHOWUSAGE	1

Modified: team/tilghman/ast_str_opaque/include/asterisk/compat.h
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/include/asterisk/compat.h?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/include/asterisk/compat.h (original)
+++ team/tilghman/ast_str_opaque/include/asterisk/compat.h Sat Nov 29 12:41:39 2008
@@ -74,7 +74,7 @@
 #endif
 
 #if !defined(HAVE_ASPRINTF) && !defined(__AST_DEBUG_MALLOC)
-int __attribute__ ((format (printf, 2, 3))) asprintf(char **str, const char *fmt, ...);
+int __attribute__((format(printf, 2, 3))) asprintf(char **str, const char *fmt, ...);
 #endif
 
 #ifndef HAVE_GETLOADAVG
@@ -110,7 +110,7 @@
 #endif
 
 #if !defined(HAVE_VASPRINTF) && !defined(__AST_DEBUG_MALLOC)
-int __attribute__ ((format (printf, 2, 0))) vasprintf(char **strp, const char *fmt, va_list ap);
+int __attribute__((format(printf, 2, 0))) vasprintf(char **strp, const char *fmt, va_list ap);
 #endif
 
 #ifndef HAVE_STRLCAT

Modified: team/tilghman/ast_str_opaque/include/asterisk/config.h
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/include/asterisk/config.h?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/include/asterisk/config.h (original)
+++ team/tilghman/ast_str_opaque/include/asterisk/config.h Sat Nov 29 12:41:39 2008
@@ -389,7 +389,7 @@
 						const char *value, const char *match, unsigned int object);
 
 int ast_config_text_file_save(const char *filename, const struct ast_config *cfg, const char *generator);
-int config_text_file_save(const char *filename, const struct ast_config *cfg, const char *generator) __attribute__ ((deprecated));
+int config_text_file_save(const char *filename, const struct ast_config *cfg, const char *generator) __attribute__((deprecated));
 
 struct ast_config *ast_config_internal_load(const char *configfile, struct ast_config *cfg, struct ast_flags flags, const char *suggested_incl_file, const char *who_asked);
 

Modified: team/tilghman/ast_str_opaque/include/asterisk/devicestate.h
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/include/asterisk/devicestate.h?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/include/asterisk/devicestate.h (original)
+++ team/tilghman/ast_str_opaque/include/asterisk/devicestate.h Sat Nov 29 12:41:39 2008
@@ -73,7 +73,7 @@
  *
  * \param devstate Current device state 
  */
-const char *devstate2str(enum ast_device_state devstate) attribute_pure __attribute__ ((deprecated));
+const char *devstate2str(enum ast_device_state devstate) attribute_pure __attribute__((deprecated));
 const char *ast_devstate2str(enum ast_device_state devstate) attribute_pure;
 
 /*! 
@@ -135,7 +135,7 @@
  * \retval -1 on failure
  */
 int ast_devstate_changed(enum ast_device_state state, const char *fmt, ...)
-	__attribute__ ((format (printf, 2, 3)));
+	__attribute__((format(printf, 2, 3)));
 
 /*! 
  * \brief Tells Asterisk the State for Device is changed
@@ -166,7 +166,7 @@
  * \note This is deprecated in favor of ast_devstate_changed()
  */
 int ast_device_state_changed(const char *fmt, ...)
-	__attribute__ ((deprecated,format (printf, 1, 2)));
+	__attribute__((deprecated,format(printf, 1, 2)));
 
 /*! 
  * \brief Tells Asterisk the State for Device is changed 
@@ -182,7 +182,7 @@
  * \note This is deprecated in favor of ast_devstate_changed_literal()
  */
 int ast_device_state_changed_literal(const char *device)
-	__attribute__ ((deprecated));
+	__attribute__((deprecated));
 
 /*! 
  * \brief Add device state provider 

Modified: team/tilghman/ast_str_opaque/include/asterisk/dlinkedlists.h
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/include/asterisk/dlinkedlists.h?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/include/asterisk/dlinkedlists.h (original)
+++ team/tilghman/ast_str_opaque/include/asterisk/dlinkedlists.h Sat Nov 29 12:41:39 2008
@@ -253,11 +253,11 @@
 	struct type *last;						\
 	ast_mutex_t lock;						\
 } name;									\
-static void  __attribute__ ((constructor)) __init_##name(void)		\
+static void  __attribute__((constructor)) __init_##name(void)		\
 {									\
         AST_DLLIST_HEAD_INIT(&name);					\
 }									\
-static void  __attribute__ ((destructor)) __fini_##name(void)		\
+static void  __attribute__((destructor)) __fini_##name(void)		\
 {									\
         AST_DLLIST_HEAD_DESTROY(&name);					\
 }									\
@@ -295,11 +295,11 @@
         struct type *last;                                              \
         ast_rwlock_t lock;                                              \
 } name;                                                                 \
-static void  __attribute__ ((constructor)) __init_##name(void)          \
+static void  __attribute__((constructor)) __init_##name(void)          \
 {                                                                       \
         AST_RWDLLIST_HEAD_INIT(&name);                                    \
 }                                                                       \
-static void  __attribute__ ((destructor)) __fini_##name(void)           \
+static void  __attribute__((destructor)) __fini_##name(void)           \
 {                                                                       \
         AST_RWDLLIST_HEAD_DESTROY(&name);                                 \
 }                                                                       \

Modified: team/tilghman/ast_str_opaque/include/asterisk/dundi.h
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/include/asterisk/dundi.h?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/include/asterisk/dundi.h (original)
+++ team/tilghman/ast_str_opaque/include/asterisk/dundi.h Sat Nov 29 12:41:39 2008
@@ -39,13 +39,13 @@
 	unsigned char cmdresp;			/*!< Command / Response */
 	unsigned char cmdflags;			/*!< Command / Response specific flags*/
 	unsigned char ies[0];
-} __attribute__ ((__packed__));
+} __attribute__((__packed__));
 
 struct dundi_ie_hdr {
 	unsigned char ie;
 	unsigned char len;
 	unsigned char iedata[0];
-} __attribute__ ((__packed__));
+} __attribute__((__packed__));
 
 #define DUNDI_FLAG_RETRANS		(1 << 16)	/*!< Applies to dtrans */
 #define DUNDI_FLAG_RESERVED		(1 << 16)	/*!< Applies to strans */
@@ -97,7 +97,7 @@
 struct dundi_encblock {				/*!< AES-128 encrypted block */
 	unsigned char iv[16];			/*!< Initialization vector of random data */
 	unsigned char encdata[0];		/*!< Encrypted / compressed data */
-} __attribute__ ((__packed__));
+} __attribute__((__packed__));
 
 struct dundi_answer {
 	dundi_eid eid;				/*!< Original source of answer */
@@ -105,12 +105,12 @@
 	unsigned short flags;			/*!< Flags relating to answer */
 	unsigned short weight;			/*!< Weight of answers */
 	unsigned char data[0];			/*!< Protocol specific URI */
-} __attribute__ ((__packed__));
+} __attribute__((__packed__));
 
 struct dundi_hint {
 	unsigned short flags;			/*!< Flags relating to answer */
 	unsigned char data[0];			/*!< For data for hint */
-} __attribute__ ((__packed__));
+} __attribute__((__packed__));
 
 enum {
 	/*! Success */
@@ -134,14 +134,14 @@
 struct dundi_cause {			
 	unsigned char causecode;		/*!< Numerical cause (DUNDI_CAUSE_*) */
 	char desc[0];				/*!< Textual description */
-} __attribute__ ((__packed__));
+} __attribute__((__packed__));
 
 struct dundi_peer_status {
 	unsigned int flags;
 	unsigned short netlag;
 	unsigned short querylag;
 	dundi_eid peereid;
-} __attribute__ ((__packed__));
+} __attribute__((__packed__));
 
 enum {
 	DUNDI_PEER_PRIMARY =        (1 << 0),

Modified: team/tilghman/ast_str_opaque/include/asterisk/enum.h
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/include/asterisk/enum.h?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/include/asterisk/enum.h (original)
+++ team/tilghman/ast_str_opaque/include/asterisk/enum.h Sat Nov 29 12:41:39 2008
@@ -28,7 +28,7 @@
 struct naptr {
 	unsigned short order;
 	unsigned short pref;
-} __attribute__ ((__packed__));
+} __attribute__((__packed__));
 
 struct enum_naptr_rr {
 	struct naptr naptr; /*!< order and preference of RR */

Modified: team/tilghman/ast_str_opaque/include/asterisk/linkedlists.h
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/include/asterisk/linkedlists.h?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/include/asterisk/linkedlists.h (original)
+++ team/tilghman/ast_str_opaque/include/asterisk/linkedlists.h Sat Nov 29 12:41:39 2008
@@ -248,11 +248,11 @@
 	struct type *last;						\
 	ast_mutex_t lock;						\
 } name;									\
-static void  __attribute__ ((constructor)) __init_##name(void)		\
+static void  __attribute__((constructor)) __init_##name(void)		\
 {									\
         AST_LIST_HEAD_INIT(&name);					\
 }									\
-static void  __attribute__ ((destructor)) __fini_##name(void)		\
+static void  __attribute__((destructor)) __fini_##name(void)		\
 {									\
         AST_LIST_HEAD_DESTROY(&name);					\
 }									\
@@ -290,11 +290,11 @@
         struct type *last;                                              \
         ast_rwlock_t lock;                                              \
 } name;                                                                 \
-static void  __attribute__ ((constructor)) __init_##name(void)          \
+static void  __attribute__((constructor)) __init_##name(void)          \
 {                                                                       \
         AST_RWLIST_HEAD_INIT(&name);                                    \
 }                                                                       \
-static void  __attribute__ ((destructor)) __fini_##name(void)           \
+static void  __attribute__((destructor)) __fini_##name(void)           \
 {                                                                       \
         AST_RWLIST_HEAD_DESTROY(&name);                                 \
 }                                                                       \

Modified: team/tilghman/ast_str_opaque/include/asterisk/lock.h
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/include/asterisk/lock.h?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/include/asterisk/lock.h (original)
+++ team/tilghman/ast_str_opaque/include/asterisk/lock.h Sat Nov 29 12:41:39 2008
@@ -1622,7 +1622,7 @@
  */
 #define __AST_MUTEX_DEFINE(scope, mutex, init_val, track)	\
 	scope ast_mutex_t mutex = init_val;			\
-static void  __attribute__ ((constructor)) init_##mutex(void)	\
+static void  __attribute__((constructor)) init_##mutex(void)	\
 {								\
 	if (track)						\
 		ast_mutex_init(&mutex);				\
@@ -1630,7 +1630,7 @@
 		ast_mutex_init_notracking(&mutex);		\
 }								\
 								\
-static void  __attribute__ ((destructor)) fini_##mutex(void)	\
+static void  __attribute__((destructor)) fini_##mutex(void)	\
 {								\
 	ast_mutex_destroy(&mutex);				\
 }
@@ -1671,14 +1671,14 @@
 #ifdef AST_MUTEX_INIT_W_CONSTRUCTORS
 #define __AST_RWLOCK_DEFINE(scope, rwlock, init_val, track) \
         scope ast_rwlock_t rwlock = init_val; \
-static void  __attribute__ ((constructor)) init_##rwlock(void) \
+static void  __attribute__((constructor)) init_##rwlock(void) \
 { \
 	if (track) \
         	ast_rwlock_init(&rwlock); \
 	else \
 		ast_rwlock_init_notracking(&rwlock); \
 } \
-static void  __attribute__ ((destructor)) fini_##rwlock(void) \
+static void  __attribute__((destructor)) fini_##rwlock(void) \
 { \
         ast_rwlock_destroy(&rwlock); \
 }

Modified: team/tilghman/ast_str_opaque/include/asterisk/logger.h
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/include/asterisk/logger.h?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/include/asterisk/logger.h (original)
+++ team/tilghman/ast_str_opaque/include/asterisk/logger.h Sat Nov 29 12:41:39 2008
@@ -58,15 +58,14 @@
  */
 
 void ast_log(int level, const char *file, int line, const char *function, const char *fmt, ...)
-	__attribute__ ((format (printf, 5, 6)));
+	__attribute__((format(printf, 5, 6)));
 
 void ast_backtrace(void);
 
 /*! \brief Reload logger without rotating log files */
 int logger_reload(void);
 
-void ast_queue_log(const char *queuename, const char *callid, const char *agent, const char *event, const char *fmt, ...)
-	__attribute__ ((format (printf, 5, 6)));
+void __attribute__((format(printf, 5, 6))) ast_queue_log(const char *queuename, const char *callid, const char *agent, const char *event, const char *fmt, ...);
 
 /*! Send a verbose message (based on verbose level)
  	\brief This works like ast_log, but prints verbose messages to the console depending on verbosity level set.
@@ -75,17 +74,15 @@
  	Note the abscence of a comma after the VERBOSE_PREFIX_3.  This is important.
  	VERBOSE_PREFIX_1 through VERBOSE_PREFIX_3 are defined.
  */
-void __ast_verbose(const char *file, int line, const char *func, const char *fmt, ...)
-	__attribute__ ((format (printf, 4, 5)));
+void __attribute__((format(printf, 4, 5))) __ast_verbose(const char *file, int line, const char *func, const char *fmt, ...);
 
 #define ast_verbose(...) __ast_verbose(__FILE__, __LINE__, __PRETTY_FUNCTION__,  __VA_ARGS__)
 
-void __ast_verbose_ap(const char *file, int line, const char *func, const char *fmt, va_list ap);
+void __attribute__((format(printf, 4, 0))) __ast_verbose_ap(const char *file, int line, const char *func, const char *fmt, va_list ap);
 
 #define ast_verbose_ap(fmt, ap)	__ast_verbose_ap(__FILE__, __LINE__, __PRETTY_FUNCTION__, fmt, ap)
 
-void ast_child_verbose(int level, const char *fmt, ...)
-	__attribute__ ((format (printf, 2, 3)));
+void __attribute__((format(printf, 2, 3))) ast_child_verbose(int level, const char *fmt, ...);
 
 int ast_register_verbose(void (*verboser)(const char *string)) attribute_warn_unused_result;
 int ast_unregister_verbose(void (*verboser)(const char *string)) attribute_warn_unused_result;

Modified: team/tilghman/ast_str_opaque/include/asterisk/manager.h
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/include/asterisk/manager.h?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/include/asterisk/manager.h (original)
+++ team/tilghman/ast_str_opaque/include/asterisk/manager.h Sat Nov 29 12:41:39 2008
@@ -181,7 +181,7 @@
 #define manager_event(category, event, contents , ...)	\
         __manager_event(category, event, __FILE__, __LINE__, __PRETTY_FUNCTION__, contents , ## __VA_ARGS__)
 
-int __attribute__ ((format(printf, 6, 7))) __manager_event(int category, const char *event,
+int __attribute__((format(printf, 6, 7))) __manager_event(int category, const char *event,
 							   const char *file, int line, const char *func,
 							   const char *contents, ...);
 
@@ -203,7 +203,7 @@
 /*! \brief Send ack in manager list transaction */
 void astman_send_listack(struct mansession *s, const struct message *m, char *msg, char *listflag);
 
-void __attribute__ ((format (printf, 2, 3))) astman_append(struct mansession *s, const char *fmt, ...);
+void __attribute__((format(printf, 2, 3))) astman_append(struct mansession *s, const char *fmt, ...);
 
 /*! \brief Determinie if a manager session ident is authenticated */
 int astman_is_authed(uint32_t ident);

Modified: team/tilghman/ast_str_opaque/include/asterisk/module.h
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/include/asterisk/module.h?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/include/asterisk/module.h (original)
+++ team/tilghman/ast_str_opaque/include/asterisk/module.h Sat Nov 29 12:41:39 2008
@@ -250,11 +250,11 @@
 		flags_to_set,				\
 		AST_BUILDOPT_SUM,			\
 	};						\
-	static void  __attribute__ ((constructor)) __reg_module(void) \
+	static void  __attribute__((constructor)) __reg_module(void) \
 	{ \
 		ast_module_register(&__mod_info); \
 	} \
-	static void  __attribute__ ((destructor)) __unreg_module(void) \
+	static void  __attribute__((destructor)) __unreg_module(void) \
 	{ \
 		ast_module_unregister(&__mod_info); \
 	} \
@@ -344,11 +344,11 @@
 		.buildopt_sum = AST_BUILDOPT_SUM,		\
 		fields						\
 	};							\
-	static void  __attribute__ ((constructor)) __reg_module(void) \
+	static void  __attribute__((constructor)) __reg_module(void) \
 	{ \
 		ast_module_register(&__mod_info); \
 	} \
-	static void  __attribute__ ((destructor)) __unreg_module(void) \
+	static void  __attribute__((destructor)) __unreg_module(void) \
 	{ \
 		ast_module_unregister(&__mod_info); \
 	} \

Modified: team/tilghman/ast_str_opaque/include/asterisk/res_odbc.h
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/include/asterisk/res_odbc.h?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/include/asterisk/res_odbc.h (original)
+++ team/tilghman/ast_str_opaque/include/asterisk/res_odbc.h Sat Nov 29 12:41:39 2008
@@ -91,7 +91,7 @@
  * This function really only ever worked with MySQL, where the statement handle is
  * not prepared on the server.  If you are not using MySQL, you should avoid it.
  */
-int ast_odbc_smart_execute(struct odbc_obj *obj, SQLHSTMT stmt) __attribute__ ((deprecated));
+int ast_odbc_smart_execute(struct odbc_obj *obj, SQLHSTMT stmt) __attribute__((deprecated));
 
 /*! 
  * \brief Retrieves a connected ODBC object

Modified: team/tilghman/ast_str_opaque/include/asterisk/stringfields.h
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/include/asterisk/stringfields.h?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/include/asterisk/stringfields.h (original)
+++ team/tilghman/ast_str_opaque/include/asterisk/stringfields.h Sat Nov 29 12:41:39 2008
@@ -183,7 +183,7 @@
 */
 void __ast_string_field_ptr_build(struct ast_string_field_mgr *mgr,
 				  struct ast_string_field_pool **pool_head,
-				  const ast_string_field *ptr, const char *format, ...);
+				  const ast_string_field *ptr, const char *format, ...) __attribute((format(printf, 4, 5)));
 
 /*!
   \internal
@@ -198,7 +198,7 @@
 */
 void __ast_string_field_ptr_build_va(struct ast_string_field_mgr *mgr,
 				     struct ast_string_field_pool **pool_head,
-				     const ast_string_field *ptr, const char *format, va_list a1, va_list a2);
+				     const ast_string_field *ptr, const char *format, va_list a1, va_list a2) __attribute((format(printf, 4, 0)));
 
 /*!
   \brief Declare a string field

Modified: team/tilghman/ast_str_opaque/include/asterisk/strings.h
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/include/asterisk/strings.h?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================
--- team/tilghman/ast_str_opaque/include/asterisk/strings.h (original)
+++ team/tilghman/ast_str_opaque/include/asterisk/strings.h Sat Nov 29 12:41:39 2008
@@ -215,7 +215,7 @@
   \retval 0 on success
   \retval non-zero on failure.
 */
-int ast_build_string(char **buffer, size_t *space, const char *fmt, ...) __attribute__ ((format (printf, 3, 4)));
+int ast_build_string(char **buffer, size_t *space, const char *fmt, ...) __attribute__((format(printf, 3, 4)));
 
 /*!
   \brief Build a string in a buffer, designed to be called repeatedly
@@ -229,7 +229,7 @@
   \param fmt printf-style format string
   \param ap varargs list of arguments for format
 */
-int ast_build_string_va(char **buffer, size_t *space, const char *fmt, va_list ap) __attribute__((format (printf, 3, 0)));
+int ast_build_string_va(char **buffer, size_t *space, const char *fmt, va_list ap) __attribute__((format(printf, 3, 0)));
 
 /*! 
  * \brief Make sure something is true.
@@ -616,8 +616,8 @@
  *       through calling one of the other functions or macros defined in this
  *       file.
  */
-int __ast_str_helper(struct ast_str **buf, size_t max_len,
-	int append, const char *fmt, va_list ap);
+int __attribute__((format(printf, 4, 0))) __ast_str_helper(struct ast_str **buf, size_t max_len,
+							   int append, const char *fmt, va_list ap);
 char *__ast_str_helper2(struct ast_str **buf, size_t max_len,
 	const char *src, size_t maxsrc, int append, int escapecommas);
 
@@ -659,7 +659,7 @@
  * }
  * \endcode
  */
-AST_INLINE_API(int ast_str_set_va(struct ast_str **buf, size_t max_len, const char *fmt, va_list ap),
+AST_INLINE_API(int __attribute__((format(printf, 3, 0))) ast_str_set_va(struct ast_str **buf, size_t max_len, const char *fmt, va_list ap),
 {
 	return __ast_str_helper(buf, max_len, 0, fmt, ap);
 }
@@ -670,7 +670,7 @@
  *
  * Same as ast_str_set_va(), but append to the current content.
  */
-AST_INLINE_API(int ast_str_append_va(struct ast_str **buf, size_t max_len, const char *fmt, va_list ap),
+AST_INLINE_API(int __attribute__((format(printf, 3, 0))) ast_str_append_va(struct ast_str **buf, size_t max_len, const char *fmt, va_list ap),
 {
 	return __ast_str_helper(buf, max_len, 1, fmt, ap);
 }
@@ -747,7 +747,7 @@
  * All the rest is the same as ast_str_set_va()
  */
 AST_INLINE_API(
-int __attribute__ ((format (printf, 3, 4))) ast_str_set(
+int __attribute__((format(printf, 3, 4))) ast_str_set(
 	struct ast_str **buf, size_t max_len, const char *fmt, ...),
 {
 	int res;
@@ -768,7 +768,7 @@
  * ast_str_set(), but the new data is appended to the current value.
  */
 AST_INLINE_API(
-int __attribute__ ((format (printf, 3, 4))) ast_str_append(
+int __attribute__((format(printf, 3, 4))) ast_str_append(
 	struct ast_str **buf, size_t max_len, const char *fmt, ...),
 {
 	int res;

Modified: team/tilghman/ast_str_opaque/include/asterisk/utils.h
URL: http://svn.digium.com/view/asterisk/team/tilghman/ast_str_opaque/include/asterisk/utils.h?view=diff&rev=159856&r1=159855&r2=159856
==============================================================================

[... 425 lines stripped ...]



More information about the asterisk-commits mailing list