printf format macros - put them in the right places for no warnings

enlightenment-0.24
Carsten Haitzler 3 years ago
parent 8a2c4ea70e
commit 7e47977d9a
  1. 4
      src/bin/e_fm_op.c
  2. 2
      src/bin/e_log.c
  3. 2
      src/bin/e_prefix.c
  4. 2
      src/bin/e_system.c
  5. 2
      src/bin/e_system.h
  6. 4
      src/bin/e_user.c
  7. 2
      src/bin/system/e_system.h
  8. 2
      src/bin/system/e_system_inout.c

@ -86,7 +86,7 @@ static int _e_fm_op_idler_handle_error(int *mark, Eina_List **queue, E
static Eina_Bool _e_fm_op_work_idler(void *data);
static Eina_Bool _e_fm_op_scan_idler(void *data);
static void _e_fm_op_send_error(E_Fm_Op_Task *task, E_Fm_Op_Type type, const char *fmt, ...);
static void _e_fm_op_send_error(E_Fm_Op_Task *task, E_Fm_Op_Type type, const char *fmt, ...) EINA_PRINTF(3, 4);
static void _e_fm_op_rollback(E_Fm_Op_Task *task);
static void _e_fm_op_update_progress_report_simple(int percent, const char *src, const char *dst);
static void _e_fm_op_update_progress(E_Fm_Op_Task *task, off_t _plus_e_fm_op_done, off_t _plus_e_fm_op_total);
@ -955,7 +955,7 @@ _e_fm_op_scan_idler(void *data EINA_UNUSED)
* fmt is a printf format string, the other arguments
* are for this format string,
*/
static void
static void EINA_PRINTF(3, 4)
_e_fm_op_send_error(E_Fm_Op_Task *task, E_Fm_Op_Type type, const char *fmt, ...)
{
va_list ap;

@ -10,7 +10,7 @@ static const char *_names[] = {
"DBG",
};
static void
static void EINA_PRINTF(6, 0)
_e_log_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const char *file, const char *fnc EINA_UNUSED, int line, const char *fmt, void *data EINA_UNUSED, va_list args)
{
const char *color;

@ -135,7 +135,7 @@ e_prefix_data_concat(char *dst, size_t size, const char *path)
return e_prefix_data_concat_len(dst, size, path, strlen(path));
}
E_API size_t
E_API size_t EINA_PRINTF(3, 4)
e_prefix_data_snprintf(char *dst, size_t size, const char *fmt, ...)
{
size_t off, ret;

@ -217,7 +217,7 @@ e_system_shutdown(void)
return 1;
}
E_API void
E_API void EINA_PRINTF(2, 3)
e_system_send(const char *cmd, const char *fmt, ...)
{
char *buf = NULL, stack_buf[4096];

@ -7,7 +7,7 @@
EINTERN int e_system_init(void);
EINTERN int e_system_shutdown(void);
E_API void e_system_send(const char *cmd, const char *fmt, ...);
E_API void e_system_send(const char *cmd, const char *fmt, ...) EINA_PRINTF(2, 3);
E_API void e_system_handler_add(const char *cmd, void (*func) (void *data, const char *params), void *data);
E_API void e_system_handler_del(const char *cmd, void (*func) (void *data, const char *params), void *data);

@ -62,7 +62,7 @@ e_user_homedir_concat(char *dst, size_t size, const char *path)
/**
* same as snprintf("~/"fmt, ...).
*/
E_API size_t
E_API size_t EINA_PRINTF(3, 4)
e_user_homedir_snprintf(char *dst, size_t size, const char *fmt, ...)
{
size_t off, ret;
@ -195,7 +195,7 @@ e_user_dir_concat(char *dst, size_t size, const char *path)
/**
* same as snprintf("~/.e/e/"fmt, ...).
*/
E_API size_t
E_API size_t EINA_PRINTF(3, 4)
e_user_dir_snprintf(char *dst, size_t size, const char *fmt, ...)
{
size_t off, ret;

@ -97,7 +97,7 @@ extern gid_t gid;
void e_system_inout_init(void);
void e_system_inout_shutdown(void);
void e_system_inout_command_register(const char *cmd, void (*func) (void *data, const char *aprams), void *data);
void e_system_inout_command_send(const char *cmd, const char *fmt, ...);
void e_system_inout_command_send(const char *cmd, const char *fmt, ...) EINA_PRINTF(2, 3);
void e_system_backlight_init(void);
void e_system_backlight_shutdown(void);

@ -116,7 +116,7 @@ e_system_inout_command_register(const char *cmd, void (*func) (void *data, const
eina_hash_add(_cmd_handlers, cmd, h);
}
void
void EINA_PRINTF(2, 3)
e_system_inout_command_send(const char *cmd, const char *fmt, ...)
{
char *buf = NULL, stack_buf[4096];

Loading…
Cancel
Save