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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2008-11-29 17:57:39 +00:00
parent 9a7c28cd5a
commit 887e28d7aa
42 changed files with 140 additions and 114 deletions

View File

@@ -644,14 +644,14 @@ enum channelreloadreason {
* \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 @@ int ast_setstate(struct ast_channel *chan, enum ast_channel_state);
* \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 @@ int ast_check_hangup(struct ast_channel *chan);
* 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 @@ int ast_channel_cmpwhentohangup_tv(struct ast_channel *chan, struct timeval offs
*
* \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);
/*!