diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-01-20 17:18:32 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-01-20 17:18:32 +0100 |
commit | 0daaa49586ff49584946cdf96549e1331f055103 (patch) | |
tree | adbf6bce58de5f8280ecf496728edd6f38bdfa58 /src/nvim/main.c | |
parent | ee84da358c27b9c0a6bbd49424bc9d04bb98d662 (diff) | |
parent | 10b1738f590fe08675173071b35fface324f4048 (diff) | |
download | rneovim-0daaa49586ff49584946cdf96549e1331f055103.tar.gz rneovim-0daaa49586ff49584946cdf96549e1331f055103.tar.bz2 rneovim-0daaa49586ff49584946cdf96549e1331f055103.zip |
Merge #7863 'mingw64: fix gcc warnings'
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r-- | src/nvim/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index 015df5d070..3402e2bebc 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -229,7 +229,7 @@ int main(int argc, char **argv) #endif { #if defined(WIN32) && !defined(MAKE_LIB) - char *argv[argc]; + char **argv = xmalloc((size_t)argc * sizeof(char *)); for (int i = 0; i < argc; i++) { char *buf = NULL; utf16_to_utf8(argv_w[i], &buf); @@ -571,6 +571,9 @@ int main(int argc, char **argv) */ normal_enter(false, false); +#if defined(WIN32) && !defined(MAKE_LIB) + xfree(argv); +#endif return 0; } @@ -1250,12 +1253,12 @@ static void check_and_set_isatty(mparm_T *paramp) stdout_isatty = paramp->output_isatty = os_isatty(fileno(stdout)); paramp->err_isatty = os_isatty(fileno(stderr)); +#ifndef WIN32 int tty_fd = paramp->input_isatty ? OS_STDIN_FILENO : (paramp->output_isatty ? OS_STDOUT_FILENO : (paramp->err_isatty ? OS_STDERR_FILENO : -1)); -#ifndef WIN32 pty_process_save_termios(tty_fd); #endif TIME_MSG("window checked"); |