diff options
Diffstat (limited to 'src/xine-engine')
| -rw-r--r-- | src/xine-engine/scratch.c | 6 | ||||
| -rw-r--r-- | src/xine-engine/scratch.h | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/xine-engine/scratch.c b/src/xine-engine/scratch.c index 1ef248dd7..c629e0cbe 100644 --- a/src/xine-engine/scratch.c +++ b/src/xine-engine/scratch.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: scratch.c,v 1.16 2003/12/09 00:02:37 f1rmb Exp $ + * $Id: scratch.c,v 1.17 2006/06/29 12:28:06 dgp85 Exp $ * * top-level xine functions * @@ -40,7 +40,9 @@ #include "scratch.h" #include "xineutils.h" -static void scratch_printf (scratch_buffer_t *this, const char *format, va_list argp) { +static void __attribute__((__format__(__printf__, 2, 0))) + scratch_printf (scratch_buffer_t *this, const char *format, va_list argp) +{ vsnprintf (this->lines[this->cur], SCRATCH_LINE_LEN_MAX, format, argp); lprintf ("printing format %s to line %d\n", format, this->cur); this->cur = (this->cur + 1) % this->num_lines; diff --git a/src/xine-engine/scratch.h b/src/xine-engine/scratch.h index 40e116ab8..34e2b3d9b 100644 --- a/src/xine-engine/scratch.h +++ b/src/xine-engine/scratch.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: scratch.h,v 1.8 2003/12/09 00:02:37 f1rmb Exp $ + * $Id: scratch.h,v 1.9 2006/06/29 12:28:06 dgp85 Exp $ * * scratch buffer for log output * @@ -34,7 +34,8 @@ typedef struct scratch_buffer_s scratch_buffer_t; struct scratch_buffer_s { - void (*scratch_printf) (scratch_buffer_t *this, const char *format, va_list ap); + void __attribute__((__format__(__printf__, 2, 0))) + (*scratch_printf) (scratch_buffer_t *this, const char *format, va_list ap); const char **(*get_content) (scratch_buffer_t *this); |
