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.
* 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;
clear_pam_wrong_timeout = NULL;
}
-static void input_done() {
+static void input_done(void) {
if (input_position == 0)
return;
* 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);
* 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
* 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.);
* 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);
} 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
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;
xinerama_active = true;
}
-void xinerama_query_screens() {
+void xinerama_query_screens(void) {
if (!xinerama_active)
return;
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