]> Sergey Matveev's repositories - nnn.git/commitdiff
Initialize variable, update musl script
authorArun Prakash Jana <engineerarun@gmail.com>
Wed, 12 May 2021 16:47:44 +0000 (22:17 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Wed, 12 May 2021 16:47:44 +0000 (22:17 +0530)
misc/musl/musl-static-ubuntu.sh
src/nnn.c

index 979caf091da596e852cc5df68356ec04e0f5a314..b05879104a2116e3a18a11716a2d69142c4209f5 100755 (executable)
@@ -33,7 +33,7 @@ cp -v libcurses/libcurses.a libterminfo/libterminfo.a libs/
 # Compile nnn
 cd ..
 [ -e "./netbsd-curses" ] || rm "$BIN"
-musl-gcc -O3 -DNORL -I./netbsd-curses/libcurses -o "$BIN" src/nnn.c -Wl,-Bsymbolic-functions -L./netbsd-curses/libs -lcurses -lterminfo -static
+musl-gcc -O3 -DNORL -DNOMOUSE -Wall -Wextra -Wshadow -I./netbsd-curses/libcurses -o "$BIN" src/nnn.c -Wl,-Bsymbolic-functions -L./netbsd-curses/libs -lcurses -lterminfo -static
 strip "$BIN"
 
 # Run the binary with it selected
index 5d8a7373c7e050234933b5412d2b56f2817045db..67350ae1bf5993e149e72a3a8748726c71800b26 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -5933,7 +5933,7 @@ static bool browse(char *ipath, const char *session, int pkey)
        bool watch = FALSE;
 
 #ifndef NOMOUSE
-       MEVENT event;
+       MEVENT event = {0};
        struct timespec mousetimings[2] = {{.tv_sec = 0, .tv_nsec = 0}, {.tv_sec = 0, .tv_nsec = 0} };
        int mousedent[2] = {-1, -1};
        bool currentmouse = 1, rightclicksel = 0;