mirror of
https://github.com/Raymo111/i3lock-color.git
synced 2025-02-17 15:55:52 -05:00
Use (void) instead of () for functions without args (Thanks fernandotcl)
See also: http://article.gmane.org/gmane.linux.kernel/1268792 The C compiler will handle (void) as "no arguments" and () as "variadic function" (equivalent to (...)) which might lead to subtle errors, such as the one which was fixed with commit 0ea64ae4.
This commit is contained in:
parent
3c2436cb71
commit
dc2b6e5f39
5 changed files with 13 additions and 13 deletions
6
i3lock.c
6
i3lock.c
|
@ -75,7 +75,7 @@ bool tile = false;
|
|||
* cold-boot attacks.
|
||||
*
|
||||
*/
|
||||
static void clear_password_memory() {
|
||||
static void clear_password_memory(void) {
|
||||
/* A volatile pointer to the password buffer to prevent the compiler from
|
||||
* optimizing this out. */
|
||||
volatile char *vpassword = password;
|
||||
|
@ -105,7 +105,7 @@ static void clear_pam_wrong(EV_P_ ev_timer *w, int revents) {
|
|||
clear_pam_wrong_timeout = NULL;
|
||||
}
|
||||
|
||||
static void input_done() {
|
||||
static void input_done(void) {
|
||||
if (input_position == 0)
|
||||
return;
|
||||
|
||||
|
@ -406,7 +406,7 @@ static void handle_mapping_notify(xcb_mapping_notify_event_t *event) {
|
|||
* and also redraw the image, if any.
|
||||
*
|
||||
*/
|
||||
void handle_screen_resize() {
|
||||
void handle_screen_resize(void) {
|
||||
xcb_get_geometry_cookie_t geomc;
|
||||
xcb_get_geometry_reply_t *geom;
|
||||
geomc = xcb_get_geometry(conn, screen->root);
|
||||
|
|
|
@ -272,7 +272,7 @@ xcb_pixmap_t draw_image(uint32_t *resolution) {
|
|||
* Calls draw_image on a new pixmap and swaps that with the current pixmap
|
||||
*
|
||||
*/
|
||||
void redraw_screen() {
|
||||
void redraw_screen(void) {
|
||||
xcb_pixmap_t bg_pixmap = draw_image(last_resolution);
|
||||
xcb_change_window_attributes(conn, win, XCB_CW_BACK_PIXMAP, (uint32_t[1]){ bg_pixmap });
|
||||
/* XXX: Possible optimization: Only update the area in the middle of the
|
||||
|
@ -303,7 +303,7 @@ static void clear_indicator(EV_P_ ev_timer *w, int revents) {
|
|||
* after an unsuccessful authentication attempt.
|
||||
*
|
||||
*/
|
||||
void start_clear_indicator_timeout() {
|
||||
void start_clear_indicator_timeout(void) {
|
||||
if (clear_indicator_timeout) {
|
||||
ev_timer_stop(main_loop, clear_indicator_timeout);
|
||||
ev_timer_set(clear_indicator_timeout, 1.0, 0.);
|
||||
|
@ -322,7 +322,7 @@ void start_clear_indicator_timeout() {
|
|||
* Stops the clear_indicator timeout.
|
||||
*
|
||||
*/
|
||||
void stop_clear_indicator_timeout() {
|
||||
void stop_clear_indicator_timeout(void) {
|
||||
if (clear_indicator_timeout) {
|
||||
ev_timer_stop(main_loop, clear_indicator_timeout);
|
||||
free(clear_indicator_timeout);
|
||||
|
|
|
@ -17,8 +17,8 @@ typedef enum {
|
|||
} pam_state_t;
|
||||
|
||||
xcb_pixmap_t draw_image(uint32_t* resolution);
|
||||
void redraw_screen();
|
||||
void start_clear_indicator_timeout();
|
||||
void stop_clear_indicator_timeout();
|
||||
void redraw_screen(void);
|
||||
void start_clear_indicator_timeout(void);
|
||||
void stop_clear_indicator_timeout(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -26,7 +26,7 @@ Rect *xr_resolutions;
|
|||
static bool xinerama_active;
|
||||
extern bool debug_mode;
|
||||
|
||||
void xinerama_init() {
|
||||
void xinerama_init(void) {
|
||||
if (!xcb_get_extension_data(conn, &xcb_xinerama_id)->present) {
|
||||
DEBUG("Xinerama extension not found, disabling.\n");
|
||||
return;
|
||||
|
@ -48,7 +48,7 @@ void xinerama_init() {
|
|||
xinerama_active = true;
|
||||
}
|
||||
|
||||
void xinerama_query_screens() {
|
||||
void xinerama_query_screens(void) {
|
||||
if (!xinerama_active)
|
||||
return;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ typedef struct Rect {
|
|||
extern int xr_screens;
|
||||
extern Rect *xr_resolutions;
|
||||
|
||||
void xinerama_init();
|
||||
void xinerama_query_screens();
|
||||
void xinerama_init(void);
|
||||
void xinerama_query_screens(void);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue