mirror of
https://github.com/opencv/opencv.git
synced 2025-06-20 01:41:14 +08:00
core: enable printf format warnings for cv::format
This commit is contained in:
parent
475c775b25
commit
4d23a5d92d
@ -51,6 +51,12 @@
|
|||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
|
#if defined(__GNUC__) || defined(__clang__) // at least GCC 3.1+, clang 3.5+
|
||||||
|
# define CV_FORMAT_PRINTF(string_idx, first_to_check) __attribute__ ((format (printf, string_idx, first_to_check)))
|
||||||
|
#else
|
||||||
|
# define CV_FORMAT_PRINTF(A, B)
|
||||||
|
#endif
|
||||||
|
|
||||||
//! @cond IGNORED
|
//! @cond IGNORED
|
||||||
|
|
||||||
namespace cv
|
namespace cv
|
||||||
@ -387,7 +393,7 @@ The function acts like sprintf but forms and returns an STL string. It can be us
|
|||||||
message in the Exception constructor.
|
message in the Exception constructor.
|
||||||
@param fmt printf-compatible formatting specifiers.
|
@param fmt printf-compatible formatting specifiers.
|
||||||
*/
|
*/
|
||||||
CV_EXPORTS String format( const char* fmt, ... );
|
CV_EXPORTS String format( const char* fmt, ... ) CV_FORMAT_PRINTF(1, 2);
|
||||||
|
|
||||||
///////////////////////////////// Formatted output of cv::Mat /////////////////////////////////
|
///////////////////////////////// Formatted output of cv::Mat /////////////////////////////////
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user