Skip to content

Commit

Permalink
patch 8.0.1827: compiler warning for signed/unsigned char pointers
Browse files Browse the repository at this point in the history
Problem:    Compiler warning for signed/unsigned char pointers. (Cesar Romani)
Solution:   Change the type of jv_argv.
  • Loading branch information
brammool committed May 13, 2018
1 parent 7db25fe commit b2ed680
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -5616,7 +5616,7 @@ job_start(typval_T *argvars, char **argv_arg, jobopt_T *opt_arg)
/* Make a copy of argv_arg for job->jv_argv. */
for (i = 0; argv_arg[i] != NULL; i++)
argc++;
argv = (char **)alloc(sizeof(char_u *) * (argc + 1));
argv = (char **)alloc(sizeof(char *) * (argc + 1));
if (argv == NULL)
goto theend;
for (i = 0; i < argc; i++)
Expand Down Expand Up @@ -5659,7 +5659,7 @@ job_start(typval_T *argvars, char **argv_arg, jobopt_T *opt_arg)
}

/* Save the command used to start the job. */
job->jv_argv = (char_u **)argv;
job->jv_argv = argv;

#ifdef USE_ARGV
if (ch_log_active())
Expand Down Expand Up @@ -5690,7 +5690,7 @@ job_start(typval_T *argvars, char **argv_arg, jobopt_T *opt_arg)
#ifndef USE_ARGV
vim_free(ga.ga_data);
#endif
if ((char_u **)argv != job->jv_argv)
if (argv != job->jv_argv)
vim_free(argv);
free_job_options(&opt);
return job;
Expand Down Expand Up @@ -5764,7 +5764,7 @@ job_info(job_T *job, dict_T *dict)
dict_add_list(dict, "cmd", l);
if (job->jv_argv != NULL)
for (i = 0; job->jv_argv[i] != NULL; i++)
list_append_string(l, job->jv_argv[i], -1);
list_append_string(l, (char_u *)job->jv_argv[i], -1);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1488,7 +1488,7 @@ struct jobvar_S
int jv_copyID;

channel_T *jv_channel; /* channel for I/O, reference counted */
char_u **jv_argv; /* command line used to start the job */
char **jv_argv; /* command line used to start the job */
};

/*
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1827,
/**/
1826,
/**/
Expand Down

0 comments on commit b2ed680

Please sign in to comment.