@@ -100,7 +100,7 @@ ldap_ldif_record_done( LDIFRecord *lr )
100
100
int
101
101
ldap_parse_ldif_record_x (
102
102
struct berval * rbuf ,
103
- int linenum ,
103
+ unsigned long linenum ,
104
104
LDIFRecord * lr ,
105
105
const char * errstr ,
106
106
unsigned int flags ,
@@ -155,7 +155,7 @@ ldap_parse_ldif_record_x(
155
155
}
156
156
157
157
if ( ( rc = ldif_parse_line2 ( line , lr -> lr_btype + i , lr -> lr_vals + i , & freev ) ) < 0 ) {
158
- fprintf ( stderr , _ ("%s: invalid format (line %d ) entry: \"%s\"\n" ),
158
+ fprintf ( stderr , _ ("%s: invalid format (line %lu ) entry: \"%s\"\n" ),
159
159
errstr , linenum + i , dn == NULL ? "" : dn );
160
160
rc = LDAP_PARAM_ERROR ;
161
161
goto leave ;
@@ -175,7 +175,7 @@ ldap_parse_ldif_record_x(
175
175
if ( lr -> lr_vals [i ].bv_len != version1 .bv_len || strncmp ( lr -> lr_vals [i ].bv_val , version1 .bv_val , version1 .bv_len ) != 0 )
176
176
{
177
177
fprintf ( stderr ,
178
- _ ("%s: invalid version %s, line %d (ignored)\n" ),
178
+ _ ("%s: invalid version %s, line %lu (ignored)\n" ),
179
179
errstr , lr -> lr_vals [i ].bv_val , linenum );
180
180
}
181
181
version ++ ;
@@ -215,15 +215,15 @@ ldap_parse_ldif_record_x(
215
215
rc = parse_ldif_control ( lr -> lr_vals + i , & pctrls );
216
216
if (rc != 0 ) {
217
217
fprintf ( stderr ,
218
- _ ("%s: Error processing %s line, line %d : %s\n" ),
218
+ _ ("%s: Error processing %s line, line %lu : %s\n" ),
219
219
errstr , BV_CONTROL .bv_val , linenum + i , ldap_err2string (rc ) );
220
220
}
221
221
}
222
222
i ++ ;
223
223
if ( i >= lr -> lr_lines ) {
224
224
short_input :
225
225
fprintf ( stderr ,
226
- _ ("%s: Expecting more input after %s line, line %d \n" ),
226
+ _ ("%s: Expecting more input after %s line, line %lu \n" ),
227
227
errstr , lr -> lr_btype [i - 1 ].bv_val , linenum + i );
228
228
229
229
rc = LDAP_PARAM_ERROR ;
@@ -244,7 +244,7 @@ ldap_parse_ldif_record_x(
244
244
245
245
if ( ++ icnt != lr -> lr_vals [i ].bv_len ) {
246
246
fprintf ( stderr , _ ("%s: illegal trailing space after"
247
- " \"%s: %s\" trimmed (line %d , entry \"%s\")\n" ),
247
+ " \"%s: %s\" trimmed (line %lu , entry \"%s\")\n" ),
248
248
errstr , BV_CHANGETYPE .bv_val , lr -> lr_vals [i ].bv_val , linenum + i , dn );
249
249
lr -> lr_vals [i ].bv_val [icnt ] = '\0' ;
250
250
}
@@ -255,7 +255,7 @@ ldap_parse_ldif_record_x(
255
255
if ( flags & LDIF_ENTRIES_ONLY ) {
256
256
if ( !( BV_CASEMATCH ( lr -> lr_vals + i , & BV_ADDCT )) ) {
257
257
ber_pvt_log_printf ( LDAP_DEBUG_ANY , ldif_debug ,
258
- _ ("%s: skipping LDIF record beginning at line %d : "
258
+ _ ("%s: skipping LDIF record beginning at line %lu : "
259
259
"changetype '%.*s' found but entries only was requested\n" ),
260
260
errstr , linenum ,
261
261
(int )lr -> lr_vals [i ].bv_len ,
@@ -279,7 +279,7 @@ ldap_parse_ldif_record_x(
279
279
goto short_input ;
280
280
if ( !BV_CASEMATCH ( lr -> lr_btype + i , & BV_NEWRDN )) {
281
281
fprintf ( stderr , _ ("%s: expecting \"%s:\" but saw"
282
- " \"%s:\" (line %d , entry \"%s\")\n" ),
282
+ " \"%s:\" (line %lu , entry \"%s\")\n" ),
283
283
errstr , BV_NEWRDN .bv_val , lr -> lr_btype [i ].bv_val , linenum + i , dn );
284
284
rc = LDAP_PARAM_ERROR ;
285
285
goto leave ;
@@ -290,7 +290,7 @@ ldap_parse_ldif_record_x(
290
290
goto short_input ;
291
291
if ( !BV_CASEMATCH ( lr -> lr_btype + i , & BV_DELETEOLDRDN )) {
292
292
fprintf ( stderr , _ ("%s: expecting \"%s:\" but saw"
293
- " \"%s:\" (line %d , entry \"%s\")\n" ),
293
+ " \"%s:\" (line %lu , entry \"%s\")\n" ),
294
294
errstr , BV_DELETEOLDRDN .bv_val , lr -> lr_btype [i ].bv_val , linenum + i , dn );
295
295
rc = LDAP_PARAM_ERROR ;
296
296
goto leave ;
@@ -300,7 +300,7 @@ ldap_parse_ldif_record_x(
300
300
if ( i < lr -> lr_lines ) {
301
301
if ( !BV_CASEMATCH ( lr -> lr_btype + i , & BV_NEWSUP )) {
302
302
fprintf ( stderr , _ ("%s: expecting \"%s:\" but saw"
303
- " \"%s:\" (line %d , entry \"%s\")\n" ),
303
+ " \"%s:\" (line %lu , entry \"%s\")\n" ),
304
304
errstr , BV_NEWSUP .bv_val , lr -> lr_btype [i ].bv_val , linenum + i , dn );
305
305
rc = LDAP_PARAM_ERROR ;
306
306
goto leave ;
@@ -313,7 +313,7 @@ ldap_parse_ldif_record_x(
313
313
got_all = delete_entry = 1 ;
314
314
} else {
315
315
fprintf ( stderr ,
316
- _ ("%s: unknown %s \"%s\" (line %d , entry \"%s\")\n" ),
316
+ _ ("%s: unknown %s \"%s\" (line %lu , entry \"%s\")\n" ),
317
317
errstr , BV_CHANGETYPE .bv_val , lr -> lr_vals [i ].bv_val , linenum + i , dn );
318
318
rc = LDAP_PARAM_ERROR ;
319
319
goto leave ;
@@ -327,7 +327,7 @@ ldap_parse_ldif_record_x(
327
327
there must be no changetype, and the flag LDIF_DEFAULT_ADD must be set */
328
328
if ( flags & LDIF_ENTRIES_ONLY ) {
329
329
ber_pvt_log_printf ( LDAP_DEBUG_ANY , ldif_debug ,
330
- _ ("%s: skipping LDIF record beginning at line %d : "
330
+ _ ("%s: skipping LDIF record beginning at line %lu : "
331
331
"no changetype found but entries only was requested and "
332
332
"the default setting for missing changetype is modify\n" ),
333
333
errstr , linenum );
@@ -339,7 +339,7 @@ ldap_parse_ldif_record_x(
339
339
if ( got_all ) {
340
340
if ( i < lr -> lr_lines ) {
341
341
fprintf ( stderr ,
342
- _ ("%s: extra lines at end (line %d , entry \"%s\")\n" ),
342
+ _ ("%s: extra lines at end (line %lu , entry \"%s\")\n" ),
343
343
errstr , linenum + i , dn );
344
344
rc = LDAP_PARAM_ERROR ;
345
345
goto leave ;
@@ -358,7 +358,7 @@ ldap_parse_ldif_record_x(
358
358
for (j = i + 1 ; j < lr -> lr_lines ; j ++ ) {
359
359
if ( !lr -> lr_btype [j ].bv_val ) {
360
360
fprintf ( stderr ,
361
- _ ("%s: missing attributeDescription (line %d , entry \"%s\")\n" ),
361
+ _ ("%s: missing attributeDescription (line %lu , entry \"%s\")\n" ),
362
362
errstr , linenum + j , dn );
363
363
rc = LDAP_PARAM_ERROR ;
364
364
goto leave ;
@@ -400,7 +400,7 @@ ldap_parse_ldif_record_x(
400
400
if ( BV_CASEMATCH ( lr -> lr_btype + i , & BV_DN )) {
401
401
fprintf ( stderr , _ ("%s: attributeDescription \"%s\":"
402
402
" (possible missing newline"
403
- " after line %d , entry \"%s\"?)\n" ),
403
+ " after line %lu , entry \"%s\"?)\n" ),
404
404
errstr , lr -> lr_btype [i ].bv_val , linenum + i - 1 , dn );
405
405
}
406
406
if ( !BV_CASEMATCH ( lr -> lr_btype + i , & bv )) {
@@ -434,7 +434,7 @@ ldap_parse_ldif_record_x(
434
434
435
435
if ( ++ icnt != lr -> lr_vals [i ].bv_len ) {
436
436
fprintf ( stderr , _ ("%s: illegal trailing space after"
437
- " \"%s: %s\" trimmed (line %d , entry \"%s\")\n" ),
437
+ " \"%s: %s\" trimmed (line %lu , entry \"%s\")\n" ),
438
438
errstr , type , lr -> lr_vals [i ].bv_val , linenum + i , dn );
439
439
lr -> lr_vals [i ].bv_val [icnt ] = '\0' ;
440
440
}
@@ -465,7 +465,7 @@ ldap_parse_ldif_record_x(
465
465
nmods -- ;
466
466
} else { /* no modify op: invalid LDIF */
467
467
fprintf ( stderr , _ ("%s: modify operation type is missing at"
468
- " line %d , entry \"%s\"\n" ),
468
+ " line %lu , entry \"%s\"\n" ),
469
469
errstr , linenum + i , dn );
470
470
rc = LDAP_PARAM_ERROR ;
471
471
goto leave ;
@@ -479,7 +479,7 @@ ldap_parse_ldif_record_x(
479
479
} else {
480
480
if ( !BV_CASEMATCH ( lr -> lr_btype + i , & bv )) {
481
481
fprintf ( stderr , _ ("%s: wrong attributeType at"
482
- " line %d , entry \"%s\"\n" ),
482
+ " line %lu , entry \"%s\"\n" ),
483
483
errstr , linenum + i , dn );
484
484
rc = LDAP_PARAM_ERROR ;
485
485
goto leave ;
@@ -564,7 +564,7 @@ ldap_parse_ldif_record_x(
564
564
int
565
565
ldap_parse_ldif_record (
566
566
struct berval * rbuf ,
567
- int linenum ,
567
+ unsigned long linenum ,
568
568
LDIFRecord * lr ,
569
569
const char * errstr ,
570
570
unsigned int flags )
0 commit comments