Skip to content

Commit

Permalink
Fix compiler warnings using PRIu64 for three more files
Browse files Browse the repository at this point in the history
  • Loading branch information
samcv committed Mar 28, 2017
1 parent 891049d commit 0acc5da
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/6model/reprs/NFA.c
Expand Up @@ -337,7 +337,7 @@ MVMObject * MVM_nfa_from_statelist(MVMThreadContext *tc, MVMObject *states, MVMO
MVMint64 to = MVM_coerce_simple_intify(tc,
MVM_repr_at_pos_o(tc, edge_info, j + 2));
if (to <= 0 && act != MVM_NFA_EDGE_FATE)
MVM_exception_throw_adhoc(tc, "Invalid to edge %ld in NFA statelist", to);
MVM_exception_throw_adhoc(tc, "Invalid to edge %"PRId64" in NFA statelist", to);

nfa->states[i][cur_edge].act = act;
nfa->states[i][cur_edge].to = to;
Expand Down Expand Up @@ -456,7 +456,7 @@ static MVMint64 * nqp_nfa_run(MVMThreadContext *tc, MVMNFABody *nfa, MVMString *
if (nfadeb) {
if (offset < eos) {
MVMGrapheme32 cp = MVM_string_get_grapheme_at_nocheck(tc, target, offset);
fprintf(stderr,"%c with %ds target %lx offset %ld\n",cp,(int)numcur, (long)target, offset);
fprintf(stderr,"%c with %ds target %lx offset %"PRId64"\n",cp,(int)numcur, (long)target, offset);
}
else {
fprintf(stderr,"EOS with %ds\n",(int)numcur);
Expand Down
2 changes: 1 addition & 1 deletion src/6model/serialization.c
Expand Up @@ -1650,7 +1650,7 @@ char *MVM_serialization_read_cstr(MVMThreadContext *tc, MVMSerializationReader *
strbuf[len] = 0;
*(reader->cur_read_offset) += len;
} else if (len < 0) {
fail_deserialize(tc, reader, "Cannot read a c string with negative length %li.", len);
fail_deserialize(tc, reader, "Cannot read a c string with negative length %"PRIi64".", len);
}
return strbuf;
}
Expand Down
4 changes: 2 additions & 2 deletions src/strings/ops.c
Expand Up @@ -412,7 +412,7 @@ MVMString * MVM_string_concatenate(MVMThreadContext *tc, MVMString *a, MVMString
total_graphs = (MVMuint64)agraphs + (MVMuint64)bgraphs;
if (total_graphs > 0xFFFFFFFF)
MVM_exception_throw_adhoc(tc,
"Can't concatenate strings, required number of graphemes %lu > max allowed of %u",
"Can't concatenate strings, required number of graphemes %"PRIu64" > max allowed of %u",
total_graphs, 0xFFFFFFFF);

/* Otherwise, we'll assemble a result string. */
Expand Down Expand Up @@ -520,7 +520,7 @@ MVMString * MVM_string_repeat(MVMThreadContext *tc, MVMString *a, MVMint64 count
total_graphs = (MVMuint64)agraphs * (MVMuint64)count;
if (total_graphs > 0xFFFFFFFF)
MVM_exception_throw_adhoc(tc,
"Can't repeat string, required number of graphemes %lu > max allowed of %u",
"Can't repeat string, required number of graphemes %"PRIu64" > max allowed of %u",
total_graphs, 0xFFFFFFFF);

/* Now build a result string with the repetition set. */
Expand Down

0 comments on commit 0acc5da

Please sign in to comment.