eesh: Fix clang-analyzer complaints

The -e and -ewait options haven't done anything a normal
non-interactive invocation does in ages.

Just ignore them and let the malloc'ing argument handling deal with it.
master
Kim Woelders 3 years ago
parent b6f500f3bc
commit 72a86722a7
  1. 11
      eesh/main.c

@ -95,6 +95,10 @@ main(int argc, char **argv)
mode = 0;
display_name = NULL;
command = NULL;
#ifdef __clang_analyzer__
/* Seems not to understand asm FD_ZERO() */
memset(&fd, 0, sizeof(fd));
#endif
for (i = 1; i < argc; i++)
{
@ -105,16 +109,10 @@ main(int argc, char **argv)
if (!strcmp(argv[i], "-e"))
{
mode = -1;
if (i != (argc - 1))
{
command = argv[++i];
}
}
else if (!strcmp(argv[i], "-ewait"))
{
mode = 1;
if (i != (argc - 1))
command = argv[++i];
}
else if (!strcmp(argv[i], "-display"))
{
@ -241,6 +239,7 @@ main(int argc, char **argv)
done:
ClientDestroy(e);
ClientDestroy(me);
free(command);
return 0;
}

Loading…
Cancel
Save