1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-22 22:58:34 +00:00

make use of __attribute__

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1076 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Phil 2008-03-29 11:35:02 +00:00
parent 3135d8e672
commit 2da63063d8
4 changed files with 15 additions and 4 deletions

View File

@ -74,6 +74,8 @@
/* #define SIGNAL_BLOCKING */
#undef SIGNAL_BLOCKING
static void print_version(void) __attribute__((noreturn));
static void print_version(void)
{
printf("Conky %s compiled %s for %s\n", VERSION, BUILD_DATE, BUILD_ARCH);
@ -966,6 +968,9 @@ static void convert_escapes(char *buf)
/* Prints anything normally printed with snprintf according to the current value
* of use_spacer. Actually slightly more flexible than snprintf, as you can
* safely specify the destination buffer as one of your inputs. */
static int spaced_print(char *, int, const char *, int, const char *, ...)
__attribute__((format(printf, 3, 6)));
static int spaced_print(char *buf, int size, const char *format, int width,
const char *func_name, ...) {
int len;
@ -1926,6 +1931,8 @@ next_iteration:
return 0;
}
void *threaded_exec(void *) __attribute__((noreturn));
void *threaded_exec(void *arg)
{
FILE *fp;
@ -1955,7 +1962,7 @@ void *threaded_exec(void *arg)
timed_thread_exit(obj->data.texeci.p_timed_thread);
}
}
return 0;
/* never reached */
}
static struct text_object *new_text_object_internal(void)

View File

@ -44,6 +44,10 @@
#include <wchar.h>
#include <sys/param.h>
#if !defined(__GNUC__)
# define __attribute__(x) /* nothing */
#endif
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#include <sys/mount.h>
#include <sys/ucred.h>
@ -687,7 +691,7 @@ char *get_apm_battery_time(void);
/* in mpd.c */
#ifdef MPD
extern void init_mpd_stats(struct information *current_info);
void *update_mpd(void *);
void *update_mpd(void *) __attribute__((noreturn));
extern timed_thread *mpd_timed_thread;
void free_mpd_vars(struct information *current_info);
#endif /* MPD */

View File

@ -333,5 +333,5 @@ void *update_mpd(void *arg)
}
continue;
}
return 0;
/* never reached */
}

View File

@ -51,7 +51,7 @@ int timed_thread_unlock(timed_thread *p_timed_thread);
int timed_thread_test(timed_thread *p_timed_thread);
/* exit a timed thread */
void timed_thread_exit(timed_thread *p_timed_thread);
void timed_thread_exit(timed_thread *p_timed_thread) __attribute__((noreturn));
/* register a timed thread for future destruction via
* timed_thread_destroy_registered_threads() */