@@ -203,7 +203,7 @@ static void emit_rewrite_diff(const char *name_a,
203
203
static int fill_mmfile (mmfile_t * mf , struct diff_filespec * one )
204
204
{
205
205
if (!DIFF_FILE_VALID (one )) {
206
- mf -> ptr = "" ; /* does not matter */
206
+ mf -> ptr = ( char * ) "" ; /* does not matter */
207
207
mf -> size = 0 ;
208
208
return 0 ;
209
209
}
@@ -395,7 +395,7 @@ static void show_stats(struct diffstat_t* data)
395
395
}
396
396
397
397
for (i = 0 ; i < data -> nr ; i ++ ) {
398
- char * prefix = "" ;
398
+ const char * prefix = "" ;
399
399
char * name = data -> files [i ]-> name ;
400
400
int added = data -> files [i ]-> added ;
401
401
int deleted = data -> files [i ]-> deleted ;
@@ -917,7 +917,7 @@ int diff_populate_filespec(struct diff_filespec *s, int size_only)
917
917
err_empty :
918
918
err = -1 ;
919
919
empty :
920
- s -> data = "" ;
920
+ s -> data = ( char * ) "" ;
921
921
s -> size = 0 ;
922
922
return err ;
923
923
}
@@ -1408,7 +1408,7 @@ int diff_setup_done(struct diff_options *options)
1408
1408
return 0 ;
1409
1409
}
1410
1410
1411
- int opt_arg (const char * arg , int arg_short , const char * arg_long , int * val )
1411
+ static int opt_arg (const char * arg , int arg_short , const char * arg_long , int * val )
1412
1412
{
1413
1413
char c , * eq ;
1414
1414
int len ;
@@ -1720,16 +1720,12 @@ static void diff_flush_raw(struct diff_filepair *p,
1720
1720
free ((void * )path_two );
1721
1721
}
1722
1722
1723
- static void diff_flush_name (struct diff_filepair * p ,
1724
- int inter_name_termination ,
1725
- int line_termination )
1723
+ static void diff_flush_name (struct diff_filepair * p , int line_termination )
1726
1724
{
1727
1725
char * path = p -> two -> path ;
1728
1726
1729
1727
if (line_termination )
1730
1728
path = quote_one (p -> two -> path );
1731
- else
1732
- path = p -> two -> path ;
1733
1729
printf ("%s%c" , path , line_termination );
1734
1730
if (p -> two -> path != path )
1735
1731
free (path );
@@ -1950,9 +1946,7 @@ static void flush_one_pair(struct diff_filepair *p,
1950
1946
options , diff_output_format );
1951
1947
break ;
1952
1948
case DIFF_FORMAT_NAME :
1953
- diff_flush_name (p ,
1954
- inter_name_termination ,
1955
- line_termination );
1949
+ diff_flush_name (p , line_termination );
1956
1950
break ;
1957
1951
case DIFF_FORMAT_NO_OUTPUT :
1958
1952
break ;
0 commit comments