Skip to content

Commit

Permalink
Removed compiler Warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
= authored and = committed Aug 24, 2013
1 parent 60730ce commit 97662c3
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 7 deletions.
Binary file added ixkeylog
Binary file not shown.
4 changes: 2 additions & 2 deletions src/args.c
Expand Up @@ -69,9 +69,9 @@ static void args_help() {
ixkeylog_opts *args_check(int argc, char **argv)
{
ixkeylog_opts *opts;
static char *opts_name = NULL;
int option_index = 0;
int c;
const char *short_options = "ho:x:";

/* Allocate memory for own opts structure */
if((opts = malloc(sizeof(struct _opts))) == NULL)
Expand All @@ -90,7 +90,7 @@ ixkeylog_opts *args_check(int argc, char **argv)

switch (c) {
case 0:
opts_name = (char *)long_options[option_index].name;
//opts_name = (char *)long_options[option_index].name;

if(args_debug_flag) /* --debug */
opts->debug = 1;
Expand Down
3 changes: 0 additions & 3 deletions src/args.h
Expand Up @@ -39,9 +39,6 @@ static int args_debug_flag = 0;
static int args_daemonize_flag = 0;
static int args_version_flag = 0;

/* Short options */
static const char *short_options = "ho:x:";


/**
* Long options for getopts
Expand Down
Binary file added src/args.o
Binary file not shown.
3 changes: 1 addition & 2 deletions src/display.c
Expand Up @@ -176,15 +176,14 @@ void display_handle_event(X11LogSess *sess) {
KeySym ks; /* Key symbol */
char *ksname = NULL; /* String representation of ks */
char buf; /* FIXME: Is this secure? */
int len = 0;

XNextEvent(sess->dpy, &ev);

if(ev.xany.type == FocusOut)
sess->focuswin = None;
else if (ev.xany.type == KeyPress) {
/* XLookupString handle keyboard input events in Latin-1 */
len = XLookupString(&ev.xkey, &buf, 99, &ks, 0);
XLookupString(&ev.xkey, &buf, 99, &ks, 0);

/* Find out string representation */
if(ks == NoSymbol) {
Expand Down
Binary file added src/display.o
Binary file not shown.
Binary file added src/main.o
Binary file not shown.
Binary file added src/signal.o
Binary file not shown.

0 comments on commit 97662c3

Please sign in to comment.