diff options
author | rcombs <rcombs@rcombs.me> | 2021-05-05 01:50:32 -0500 |
---|---|---|
committer | Oneric <oneric@oneric.stub> | 2021-05-31 00:11:04 +0200 |
commit | 11607d56bd64c54f5a7bbdc631d96b0bb29fc8a4 (patch) | |
tree | 2f3d8c0859e3ee4e6d3d05491ae9f263a999976c | |
parent | 2b00b4e7c63b498449d2acf3ce490fd7c8c65a28 (diff) | |
download | libass-11607d56bd64c54f5a7bbdc631d96b0bb29fc8a4.tar.bz2 libass-11607d56bd64c54f5a7bbdc631d96b0bb29fc8a4.tar.xz |
ass_utils: add format-string attr to ass_msg
Allows compilers to print warnings when the args we pass don't match the string
-rw-r--r-- | libass/ass_utils.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libass/ass_utils.h b/libass/ass_utils.h index 377d532..0743ff2 100644 --- a/libass/ass_utils.h +++ b/libass/ass_utils.h @@ -104,6 +104,9 @@ int numpad2align(int val); unsigned ass_utf8_get_char(char **str); unsigned ass_utf8_put_char(char *dest, uint32_t ch); void ass_utf16be_to_utf8(char *dst, size_t dst_size, uint8_t *src, size_t src_size); +#ifdef __GNUC__ + __attribute__ ((format (printf, 3, 4))) +#endif void ass_msg(ASS_Library *priv, int lvl, const char *fmt, ...); int lookup_style(ASS_Track *track, char *name); ASS_Style *lookup_style_strict(ASS_Track *track, char *name, size_t len); |