summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2023-05-07 01:04:44 +0200
committerGravatar Nikias Bassen2023-05-07 01:04:44 +0200
commit1d45b855dab1c486aea470a7c9ceb30a9cab5d4b (patch)
tree80586ed59dfaa998df8f5dd9f5005651dec941e9 /src
parent57a7f14e92307959f6c05eaa55da4fb0c8f7b5aa (diff)
downloadlibplist-1d45b855dab1c486aea470a7c9ceb30a9cab5d4b.tar.gz
libplist-1d45b855dab1c486aea470a7c9ceb30a9cab5d4b.tar.bz2
Silence more compiler warning on 32bit systems
Diffstat (limited to 'src')
-rw-r--r--src/oplist.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/oplist.c b/src/oplist.c
index a750767..9c6b1d9 100644
--- a/src/oplist.c
+++ b/src/oplist.c
@@ -546,24 +546,24 @@ static void parse_dict_data(parse_ctx ctx, plist_t dict)
546 break; 546 break;
547 } 547 }
548 if (!PLIST_IS_STRING(key)) { 548 if (!PLIST_IS_STRING(key)) {
549 PLIST_OSTEP_ERR("Invalid type for dictionary key at offset %ld\n", ctx->pos - ctx->start); 549 PLIST_OSTEP_ERR("Invalid type for dictionary key at offset %ld\n", (long int)(ctx->pos - ctx->start));
550 ctx->err++; 550 ctx->err++;
551 break; 551 break;
552 } 552 }
553 parse_skip_ws(ctx); 553 parse_skip_ws(ctx);
554 if (ctx->pos >= ctx->end) { 554 if (ctx->pos >= ctx->end) {
555 PLIST_OSTEP_ERR("EOF while parsing dictionary '=' delimiter at offset %ld\n", ctx->pos - ctx->start); 555 PLIST_OSTEP_ERR("EOF while parsing dictionary '=' delimiter at offset %ld\n", (long int)(ctx->pos - ctx->start));
556 ctx->err++; 556 ctx->err++;
557 break; 557 break;
558 } 558 }
559 if (*ctx->pos != '=') { 559 if (*ctx->pos != '=') {
560 PLIST_OSTEP_ERR("Missing '=' while parsing dictionary item at offset %ld\n", ctx->pos - ctx->start); 560 PLIST_OSTEP_ERR("Missing '=' while parsing dictionary item at offset %ld\n", (long int)(ctx->pos - ctx->start));
561 ctx->err++; 561 ctx->err++;
562 break; 562 break;
563 } 563 }
564 ctx->pos++; 564 ctx->pos++;
565 if (ctx->pos >= ctx->end) { 565 if (ctx->pos >= ctx->end) {
566 PLIST_OSTEP_ERR("EOF while parsing dictionary item at offset %ld\n", ctx->pos - ctx->start); 566 PLIST_OSTEP_ERR("EOF while parsing dictionary item at offset %ld\n", (long int)(ctx->pos - ctx->start));
567 ctx->err++; 567 ctx->err++;
568 break; 568 break;
569 } 569 }
@@ -573,18 +573,18 @@ static void parse_dict_data(parse_ctx ctx, plist_t dict)
573 break; 573 break;
574 } 574 }
575 if (!val) { 575 if (!val) {
576 PLIST_OSTEP_ERR("Missing value for dictionary item at offset %ld\n", ctx->pos - ctx->start); 576 PLIST_OSTEP_ERR("Missing value for dictionary item at offset %ld\n", (long int)(ctx->pos - ctx->start));
577 ctx->err++; 577 ctx->err++;
578 break; 578 break;
579 } 579 }
580 parse_skip_ws(ctx); 580 parse_skip_ws(ctx);
581 if (ctx->pos >= ctx->end) { 581 if (ctx->pos >= ctx->end) {
582 PLIST_OSTEP_ERR("EOF while parsing dictionary item terminator ';' at offset %ld\n", ctx->pos - ctx->start); 582 PLIST_OSTEP_ERR("EOF while parsing dictionary item terminator ';' at offset %ld\n", (long int)(ctx->pos - ctx->start));
583 ctx->err++; 583 ctx->err++;
584 break; 584 break;
585 } 585 }
586 if (*ctx->pos != ';') { 586 if (*ctx->pos != ';') {
587 PLIST_OSTEP_ERR("Missing terminating ';' while parsing dictionary item at offset %ld\n", ctx->pos - ctx->start); 587 PLIST_OSTEP_ERR("Missing terminating ';' while parsing dictionary item at offset %ld\n", (long int)(ctx->pos - ctx->start));
588 ctx->err++; 588 ctx->err++;
589 break; 589 break;
590 } 590 }
@@ -606,7 +606,7 @@ static int node_from_openstep(parse_ctx ctx, plist_t *plist)
606 const char *p = NULL; 606 const char *p = NULL;
607 ctx->depth++; 607 ctx->depth++;
608 if (ctx->depth > 1000) { 608 if (ctx->depth > 1000) {
609 PLIST_OSTEP_ERR("Too many levels of recursion (%u) at offset %ld\n", ctx->depth, ctx->pos - ctx->start); 609 PLIST_OSTEP_ERR("Too many levels of recursion (%u) at offset %ld\n", ctx->depth, (long int)(ctx->pos - ctx->start));
610 ctx->err++; 610 ctx->err++;
611 return PLIST_ERR_PARSE; 611 return PLIST_ERR_PARSE;
612 } 612 }
@@ -625,12 +625,12 @@ static int node_from_openstep(parse_ctx ctx, plist_t *plist)
625 goto err_out; 625 goto err_out;
626 } 626 }
627 if (ctx->pos >= ctx->end) { 627 if (ctx->pos >= ctx->end) {
628 PLIST_OSTEP_ERR("EOF while parsing dictionary terminator '}' at offset %ld\n", ctx->pos - ctx->start); 628 PLIST_OSTEP_ERR("EOF while parsing dictionary terminator '}' at offset %ld\n", (long int)(ctx->pos - ctx->start));
629 ctx->err++; 629 ctx->err++;
630 break; 630 break;
631 } 631 }
632 if (*ctx->pos != '}') { 632 if (*ctx->pos != '}') {
633 PLIST_OSTEP_ERR("Missing terminating '}' at offset %ld\n", ctx->pos - ctx->start); 633 PLIST_OSTEP_ERR("Missing terminating '}' at offset %ld\n", (long int)(ctx->pos - ctx->start));
634 ctx->err++; 634 ctx->err++;
635 goto err_out; 635 goto err_out;
636 } 636 }
@@ -660,7 +660,7 @@ static int node_from_openstep(parse_ctx ctx, plist_t *plist)
660 tmp = NULL; 660 tmp = NULL;
661 parse_skip_ws(ctx); 661 parse_skip_ws(ctx);
662 if (ctx->pos >= ctx->end) { 662 if (ctx->pos >= ctx->end) {
663 PLIST_OSTEP_ERR("EOF while parsing array item delimiter ',' at offset %ld\n", ctx->pos - ctx->start); 663 PLIST_OSTEP_ERR("EOF while parsing array item delimiter ',' at offset %ld\n", (long int)(ctx->pos - ctx->start));
664 ctx->err++; 664 ctx->err++;
665 break; 665 break;
666 } 666 }
@@ -675,12 +675,12 @@ static int node_from_openstep(parse_ctx ctx, plist_t *plist)
675 goto err_out; 675 goto err_out;
676 } 676 }
677 if (ctx->pos >= ctx->end) { 677 if (ctx->pos >= ctx->end) {
678 PLIST_OSTEP_ERR("EOF while parsing array terminator ')' at offset %ld\n", ctx->pos - ctx->start); 678 PLIST_OSTEP_ERR("EOF while parsing array terminator ')' at offset %ld\n", (long int)(ctx->pos - ctx->start));
679 ctx->err++; 679 ctx->err++;
680 break; 680 break;
681 } 681 }
682 if (*ctx->pos != ')') { 682 if (*ctx->pos != ')') {
683 PLIST_OSTEP_ERR("Missing terminating ')' at offset %ld\n", ctx->pos - ctx->start); 683 PLIST_OSTEP_ERR("Missing terminating ')' at offset %ld\n", (long int)(ctx->pos - ctx->start));
684 ctx->err++; 684 ctx->err++;
685 goto err_out; 685 goto err_out;
686 } 686 }
@@ -695,7 +695,7 @@ static int node_from_openstep(parse_ctx ctx, plist_t *plist)
695 while (ctx->pos < ctx->end && !ctx->err) { 695 while (ctx->pos < ctx->end && !ctx->err) {
696 parse_skip_ws(ctx); 696 parse_skip_ws(ctx);
697 if (ctx->pos >= ctx->end) { 697 if (ctx->pos >= ctx->end) {
698 PLIST_OSTEP_ERR("EOF while parsing data terminator '>' at offset %ld\n", ctx->pos - ctx->start); 698 PLIST_OSTEP_ERR("EOF while parsing data terminator '>' at offset %ld\n", (long int)(ctx->pos - ctx->start));
699 ctx->err++; 699 ctx->err++;
700 break; 700 break;
701 } 701 }
@@ -703,19 +703,19 @@ static int node_from_openstep(parse_ctx ctx, plist_t *plist)
703 break; 703 break;
704 } 704 }
705 if (!isxdigit(*ctx->pos)) { 705 if (!isxdigit(*ctx->pos)) {
706 PLIST_OSTEP_ERR("Invalid byte group in data at offset %ld\n", ctx->pos - ctx->start); 706 PLIST_OSTEP_ERR("Invalid byte group in data at offset %ld\n", (long int)(ctx->pos - ctx->start));
707 ctx->err++; 707 ctx->err++;
708 break; 708 break;
709 } 709 }
710 uint8_t b = HEX_DIGIT(*ctx->pos); 710 uint8_t b = HEX_DIGIT(*ctx->pos);
711 ctx->pos++; 711 ctx->pos++;
712 if (ctx->pos >= ctx->end) { 712 if (ctx->pos >= ctx->end) {
713 PLIST_OSTEP_ERR("Unexpected end of data at offset %ld\n", ctx->pos - ctx->start); 713 PLIST_OSTEP_ERR("Unexpected end of data at offset %ld\n", (long int)(ctx->pos - ctx->start));
714 ctx->err++; 714 ctx->err++;
715 break; 715 break;
716 } 716 }
717 if (!isxdigit(*ctx->pos)) { 717 if (!isxdigit(*ctx->pos)) {
718 PLIST_OSTEP_ERR("Invalid byte group in data at offset %ld\n", ctx->pos - ctx->start); 718 PLIST_OSTEP_ERR("Invalid byte group in data at offset %ld\n", (long int)(ctx->pos - ctx->start));
719 ctx->err++; 719 ctx->err++;
720 break; 720 break;
721 } 721 }
@@ -731,14 +731,14 @@ static int node_from_openstep(parse_ctx ctx, plist_t *plist)
731 if (ctx->pos >= ctx->end) { 731 if (ctx->pos >= ctx->end) {
732 byte_array_free(bytes); 732 byte_array_free(bytes);
733 plist_free_data(data); 733 plist_free_data(data);
734 PLIST_OSTEP_ERR("EOF while parsing data terminator '>' at offset %ld\n", ctx->pos - ctx->start); 734 PLIST_OSTEP_ERR("EOF while parsing data terminator '>' at offset %ld\n", (long int)(ctx->pos - ctx->start));
735 ctx->err++; 735 ctx->err++;
736 goto err_out; 736 goto err_out;
737 } 737 }
738 if (*ctx->pos != '>') { 738 if (*ctx->pos != '>') {
739 byte_array_free(bytes); 739 byte_array_free(bytes);
740 plist_free_data(data); 740 plist_free_data(data);
741 PLIST_OSTEP_ERR("Missing terminating '>' at offset %ld\n", ctx->pos - ctx->start); 741 PLIST_OSTEP_ERR("Missing terminating '>' at offset %ld\n", (long int)(ctx->pos - ctx->start));
742 ctx->err++; 742 ctx->err++;
743 goto err_out; 743 goto err_out;
744 } 744 }
@@ -766,13 +766,13 @@ static int node_from_openstep(parse_ctx ctx, plist_t *plist)
766 } 766 }
767 if (ctx->pos >= ctx->end) { 767 if (ctx->pos >= ctx->end) {
768 plist_free_data(data); 768 plist_free_data(data);
769 PLIST_OSTEP_ERR("EOF while parsing quoted string at offset %ld\n", ctx->pos - ctx->start); 769 PLIST_OSTEP_ERR("EOF while parsing quoted string at offset %ld\n", (long int)(ctx->pos - ctx->start));
770 ctx->err++; 770 ctx->err++;
771 goto err_out; 771 goto err_out;
772 } 772 }
773 if (*ctx->pos != c) { 773 if (*ctx->pos != c) {
774 plist_free_data(data); 774 plist_free_data(data);
775 PLIST_OSTEP_ERR("Missing closing quote (%c) at offset %ld\n", c, ctx->pos - ctx->start); 775 PLIST_OSTEP_ERR("Missing closing quote (%c) at offset %ld\n", c, (long int)(ctx->pos - ctx->start));
776 ctx->err++; 776 ctx->err++;
777 goto err_out; 777 goto err_out;
778 } 778 }
@@ -873,7 +873,7 @@ static int node_from_openstep(parse_ctx ctx, plist_t *plist)
873 break; 873 break;
874 } else { 874 } else {
875 plist_free_data(data); 875 plist_free_data(data);
876 PLIST_OSTEP_ERR("Unexpected character when parsing unquoted string at offset %ld\n", ctx->pos - ctx->start); 876 PLIST_OSTEP_ERR("Unexpected character when parsing unquoted string at offset %ld\n", (long int)(ctx->pos - ctx->start));
877 ctx->err++; 877 ctx->err++;
878 break; 878 break;
879 } 879 }