Add attributes to various API calls, to help track down bugs (and remove a deprecated function)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2008-05-02 02:33:04 +00:00
parent 9e82fd7ec4
commit b11854445b
8 changed files with 128 additions and 88 deletions

View File

@@ -155,7 +155,7 @@ char *ast_sched_report(struct sched_context *con, char *buf, int bufsiz, struct
* \param data data to pass to the callback
* \return Returns a schedule item ID on success, -1 on failure
*/
int ast_sched_add(struct sched_context *con, int when, ast_sched_cb callback, const void *data);
int ast_sched_add(struct sched_context *con, int when, ast_sched_cb callback, const void *data) __attribute__((warn_unused_result));
/*!
* \brief replace a scheduler entry
@@ -168,7 +168,7 @@ int ast_sched_add(struct sched_context *con, int when, ast_sched_cb callback, co
* \retval -1 failure
* \retval otherwise, returns scheduled item ID
*/
int ast_sched_replace(int old_id, struct sched_context *con, int when, ast_sched_cb callback, const void *data);
int ast_sched_replace(int old_id, struct sched_context *con, int when, ast_sched_cb callback, const void *data) __attribute__((warn_unused_result));
/*!Adds a scheduled event with rescheduling support
* \param con Scheduler context to add
@@ -183,7 +183,7 @@ int ast_sched_replace(int old_id, struct sched_context *con, int when, ast_sched
* If callback returns 0, no further events will be re-scheduled
* \return Returns a schedule item ID on success, -1 on failure
*/
int ast_sched_add_variable(struct sched_context *con, int when, ast_sched_cb callback, const void *data, int variable);
int ast_sched_add_variable(struct sched_context *con, int when, ast_sched_cb callback, const void *data, int variable) __attribute__((warn_unused_result));
/*!
* \brief replace a scheduler entry
@@ -196,7 +196,7 @@ int ast_sched_add_variable(struct sched_context *con, int when, ast_sched_cb cal
* \retval -1 failure
* \retval otherwise, returns scheduled item ID
*/
int ast_sched_replace_variable(int old_id, struct sched_context *con, int when, ast_sched_cb callback, const void *data, int variable);
int ast_sched_replace_variable(int old_id, struct sched_context *con, int when, ast_sched_cb callback, const void *data, int variable) __attribute__((warn_unused_result));
/*! \brief Find a sched structure and return the data field associated with it.
@@ -216,8 +216,7 @@ const void *ast_sched_find_data(struct sched_context *con, int id);
* \param id ID of the scheduled item to delete
* \return Returns 0 on success, -1 on failure
*/
int ast_sched_del(struct sched_context *con, int id);
int ast_sched_del(struct sched_context *con, int id) __attribute__((warn_unused_result));
/*! \brief Determines number of seconds until the next outstanding event to take place
* Determine the number of seconds until the next outstanding event
@@ -228,7 +227,7 @@ int ast_sched_del(struct sched_context *con, int id);
* \return Returns "-1" if there is nothing there are no scheduled events
* (and thus the poll should not timeout)
*/
int ast_sched_wait(struct sched_context *con);
int ast_sched_wait(struct sched_context *con) __attribute__((warn_unused_result));
/*! \brief Runs the queue
* \param con Scheduling context to run