kwo pushed a commit to branch master.

http://git.enlightenment.org/e16/e16.git/commit/?id=72a86722a7fca9bd3b423bccc2d7a1fa4a0178ec

commit 72a86722a7fca9bd3b423bccc2d7a1fa4a0178ec
Author: Kim Woelders <[email protected]>
Date:   Sat Jan 25 16:41:10 2020 +0100

    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.
---
 eesh/main.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/eesh/main.c b/eesh/main.c
index 553e1b21..aeab0c79 100644
--- a/eesh/main.c
+++ b/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;
 }

-- 


Reply via email to