* mu-msg-str: use G_GNUC_WARN_UNUSED_RESULT where it makes sense
This commit is contained in:
@ -44,7 +44,10 @@ mu_msg_str_date (time_t t)
|
|||||||
const char*
|
const char*
|
||||||
mu_msg_str_size_s (size_t s)
|
mu_msg_str_size_s (size_t s)
|
||||||
{
|
{
|
||||||
|
/* note: we we use the powers-of-10, not powers-of-2 */
|
||||||
|
|
||||||
static char buf[32];
|
static char buf[32];
|
||||||
|
|
||||||
if (s >= 1000 * 1000)
|
if (s >= 1000 * 1000)
|
||||||
g_snprintf(buf, 32, "%.1fM", (double)s/(1000*1000));
|
g_snprintf(buf, 32, "%.1fM", (double)s/(1000*1000));
|
||||||
else
|
else
|
||||||
|
|||||||
@ -41,7 +41,7 @@
|
|||||||
* for what to do with it
|
* for what to do with it
|
||||||
*/
|
*/
|
||||||
const char* mu_msg_str_date_s (time_t t) G_GNUC_CONST;
|
const char* mu_msg_str_date_s (time_t t) G_GNUC_CONST;
|
||||||
char* mu_msg_str_date (time_t t);
|
char* mu_msg_str_date (time_t t) G_GNUC_WARN_UNUSED_RESULT;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -58,7 +58,7 @@ char* mu_msg_str_date (time_t t);
|
|||||||
* for what to do with it
|
* for what to do with it
|
||||||
*/
|
*/
|
||||||
const char* mu_msg_str_size_s (size_t s) G_GNUC_CONST;
|
const char* mu_msg_str_size_s (size_t s) G_GNUC_CONST;
|
||||||
char* mu_msg_str_size (size_t s);
|
char* mu_msg_str_size (size_t s) G_GNUC_WARN_UNUSED_RESULT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get a display string for a given set of flags, OR'ed in
|
* get a display string for a given set of flags, OR'ed in
|
||||||
@ -76,7 +76,7 @@ char* mu_msg_str_size (size_t s);
|
|||||||
* for what to do with it
|
* for what to do with it
|
||||||
*/
|
*/
|
||||||
const char* mu_msg_str_flags_s (MuMsgFlags flags) G_GNUC_CONST;
|
const char* mu_msg_str_flags_s (MuMsgFlags flags) G_GNUC_CONST;
|
||||||
char* mu_msg_str_flags (MuMsgFlags flags);
|
char* mu_msg_str_flags (MuMsgFlags flags) G_GNUC_WARN_UNUSED_RESULT;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user