comparison src/channel.c @ 13913:3e5c24ecc313 v8.0.1827

patch 8.0.1827: compiler warning for signed/unsigned char pointers commit https://github.com/vim/vim/commit/b2ed680ba760ec5eb2c626363ecbda4dd2528794 Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 13 14:05:18 2018 +0200 patch 8.0.1827: compiler warning for signed/unsigned char pointers Problem: Compiler warning for signed/unsigned char pointers. (Cesar Romani) Solution: Change the type of jv_argv.
author Christian Brabandt <cb@256bit.org>
date Sun, 13 May 2018 14:15:06 +0200
parents fa0dcdaec6a3
children 8314bb913e14
comparison
equal deleted inserted replaced
13912:a9fdf01085a8 13913:3e5c24ecc313
5614 if (argv_arg != NULL) 5614 if (argv_arg != NULL)
5615 { 5615 {
5616 /* Make a copy of argv_arg for job->jv_argv. */ 5616 /* Make a copy of argv_arg for job->jv_argv. */
5617 for (i = 0; argv_arg[i] != NULL; i++) 5617 for (i = 0; argv_arg[i] != NULL; i++)
5618 argc++; 5618 argc++;
5619 argv = (char **)alloc(sizeof(char_u *) * (argc + 1)); 5619 argv = (char **)alloc(sizeof(char *) * (argc + 1));
5620 if (argv == NULL) 5620 if (argv == NULL)
5621 goto theend; 5621 goto theend;
5622 for (i = 0; i < argc; i++) 5622 for (i = 0; i < argc; i++)
5623 argv[i] = (char *)vim_strsave((char_u *)argv_arg[i]); 5623 argv[i] = (char *)vim_strsave((char_u *)argv_arg[i]);
5624 argv[argc] = NULL; 5624 argv[argc] = NULL;
5657 cmd = ga.ga_data; 5657 cmd = ga.ga_data;
5658 #endif 5658 #endif
5659 } 5659 }
5660 5660
5661 /* Save the command used to start the job. */ 5661 /* Save the command used to start the job. */
5662 job->jv_argv = (char_u **)argv; 5662 job->jv_argv = argv;
5663 5663
5664 #ifdef USE_ARGV 5664 #ifdef USE_ARGV
5665 if (ch_log_active()) 5665 if (ch_log_active())
5666 { 5666 {
5667 garray_T ga; 5667 garray_T ga;
5688 5688
5689 theend: 5689 theend:
5690 #ifndef USE_ARGV 5690 #ifndef USE_ARGV
5691 vim_free(ga.ga_data); 5691 vim_free(ga.ga_data);
5692 #endif 5692 #endif
5693 if ((char_u **)argv != job->jv_argv) 5693 if (argv != job->jv_argv)
5694 vim_free(argv); 5694 vim_free(argv);
5695 free_job_options(&opt); 5695 free_job_options(&opt);
5696 return job; 5696 return job;
5697 } 5697 }
5698 5698
5762 if (l != NULL) 5762 if (l != NULL)
5763 { 5763 {
5764 dict_add_list(dict, "cmd", l); 5764 dict_add_list(dict, "cmd", l);
5765 if (job->jv_argv != NULL) 5765 if (job->jv_argv != NULL)
5766 for (i = 0; job->jv_argv[i] != NULL; i++) 5766 for (i = 0; job->jv_argv[i] != NULL; i++)
5767 list_append_string(l, job->jv_argv[i], -1); 5767 list_append_string(l, (char_u *)job->jv_argv[i], -1);
5768 } 5768 }
5769 } 5769 }
5770 5770
5771 /* 5771 /*
5772 * Implementation of job_info() to return info for all jobs. 5772 * Implementation of job_info() to return info for all jobs.