@@ -137,7 +137,7 @@ static long get_func_line(xdfenv_t *xe, xdemitconf_t const *xecfg,
137137 buf = func_line ? func_line -> buf : dummy ;
138138 size = func_line ? sizeof (func_line -> buf ) : sizeof (dummy );
139139
140- for (l = start ; l != limit && 0 <= l && l < xe -> xdf1 .nrec ; l += step ) {
140+ for (l = start ; l != limit && 0 <= l && l < ( long ) xe -> xdf1 .nrec ; l += step ) {
141141 long len = match_func_rec (& xe -> xdf1 , xecfg , l , buf , size );
142142 if (len >= 0 ) {
143143 if (func_line )
@@ -179,14 +179,14 @@ int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
179179 long fs1 , i1 = xch -> i1 ;
180180
181181 /* Appended chunk? */
182- if (i1 >= xe -> xdf1 .nrec ) {
182+ if (i1 >= ( long ) xe -> xdf1 .nrec ) {
183183 long i2 = xch -> i2 ;
184184
185185 /*
186186 * We don't need additional context if
187187 * a whole function was added.
188188 */
189- while (i2 < xe -> xdf2 .nrec ) {
189+ while (i2 < ( long ) xe -> xdf2 .nrec ) {
190190 if (is_func_rec (& xe -> xdf2 , xecfg , i2 ))
191191 goto post_context_calculation ;
192192 i2 ++ ;
@@ -196,7 +196,7 @@ int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
196196 * Otherwise get more context from the
197197 * pre-image.
198198 */
199- i1 = xe -> xdf1 .nrec - 1 ;
199+ i1 = ( long ) xe -> xdf1 .nrec - 1 ;
200200 }
201201
202202 fs1 = get_func_line (xe , xecfg , NULL , i1 , -1 );
@@ -228,22 +228,22 @@ int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
228228
229229 post_context_calculation :
230230 lctx = xecfg -> ctxlen ;
231- lctx = XDL_MIN (lctx , xe -> xdf1 .nrec - (xche -> i1 + xche -> chg1 ));
232- lctx = XDL_MIN (lctx , xe -> xdf2 .nrec - (xche -> i2 + xche -> chg2 ));
231+ lctx = XDL_MIN (lctx , ( long ) xe -> xdf1 .nrec - (xche -> i1 + xche -> chg1 ));
232+ lctx = XDL_MIN (lctx , ( long ) xe -> xdf2 .nrec - (xche -> i2 + xche -> chg2 ));
233233
234234 e1 = xche -> i1 + xche -> chg1 + lctx ;
235235 e2 = xche -> i2 + xche -> chg2 + lctx ;
236236
237237 if (xecfg -> flags & XDL_EMIT_FUNCCONTEXT ) {
238238 long fe1 = get_func_line (xe , xecfg , NULL ,
239239 xche -> i1 + xche -> chg1 ,
240- xe -> xdf1 .nrec );
240+ ( long ) xe -> xdf1 .nrec );
241241 while (fe1 > 0 && is_empty_rec (& xe -> xdf1 , fe1 - 1 ))
242242 fe1 -- ;
243243 if (fe1 < 0 )
244- fe1 = xe -> xdf1 .nrec ;
244+ fe1 = ( long ) xe -> xdf1 .nrec ;
245245 if (fe1 > e1 ) {
246- e2 = XDL_MIN (e2 + (fe1 - e1 ), xe -> xdf2 .nrec );
246+ e2 = XDL_MIN (e2 + (fe1 - e1 ), ( long ) xe -> xdf2 .nrec );
247247 e1 = fe1 ;
248248 }
249249
@@ -254,7 +254,7 @@ int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
254254 */
255255 if (xche -> next ) {
256256 long l = XDL_MIN (xche -> next -> i1 ,
257- xe -> xdf1 .nrec - 1 );
257+ ( long ) xe -> xdf1 .nrec - 1 );
258258 if (l - xecfg -> ctxlen <= e1 ||
259259 get_func_line (xe , xecfg , NULL , l , e1 ) < 0 ) {
260260 xche = xche -> next ;
0 commit comments