@@ -158,6 +158,7 @@ ch_log_lead(const char *what, channel_T *ch)
158158
159159static int did_log_msg = TRUE;
160160
161+ #ifndef PROTO /* prototype is in vim.h */
161162 void
162163ch_log (channel_T * ch , const char * fmt , ...)
163164{
@@ -174,6 +175,14 @@ ch_log(channel_T *ch, const char *fmt, ...)
174175 did_log_msg = TRUE;
175176 }
176177}
178+ #endif
179+
180+ static void
181+ ch_error (channel_T * ch , const char * fmt , ...)
182+ #ifdef __GNUC__
183+ __attribute__((format (printf , 2 , 3 )))
184+ #endif
185+ ;
177186
178187 static void
179188ch_error (channel_T * ch , const char * fmt , ...)
@@ -1442,8 +1451,8 @@ channel_write_in(channel_T *channel)
14421451 ch_close_part (channel , PART_IN );
14431452 }
14441453 else
1445- ch_log (channel , "Still %d more lines to write" ,
1446- buf -> b_ml .ml_line_count - lnum + 1 );
1454+ ch_log (channel , "Still %ld more lines to write" ,
1455+ ( long )( buf -> b_ml .ml_line_count - lnum + 1 ) );
14471456}
14481457
14491458/*
@@ -1536,8 +1545,8 @@ channel_write_new_lines(buf_T *buf)
15361545 else if (written > 1 )
15371546 ch_log (channel , "written %d lines to channel" , written );
15381547 if (lnum < buf -> b_ml .ml_line_count )
1539- ch_log (channel , "Still %d more lines to write" ,
1540- buf -> b_ml .ml_line_count - lnum );
1548+ ch_log (channel , "Still %ld more lines to write" ,
1549+ ( long )( buf -> b_ml .ml_line_count - lnum ) );
15411550
15421551 in_part -> ch_buf_bot = lnum ;
15431552 }
@@ -2081,7 +2090,8 @@ channel_get_json(
20812090 {
20822091 * rettv = item -> jq_value ;
20832092 if (tv -> v_type == VAR_NUMBER )
2084- ch_log (channel , "Getting JSON message %d" , tv -> vval .v_number );
2093+ ch_log (channel , "Getting JSON message %ld" ,
2094+ (long )tv -> vval .v_number );
20852095 remove_json_node (head , item );
20862096 return OK ;
20872097 }
0 commit comments