summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-26 05:33:01 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-26 05:33:01 (GMT)
commitd5b81e68442fc5a67fdcf7bd19c660b61fe0db7e (patch)
treee98e6edbcd2c1d546da49955353e42d73eb036e3
parent3d2b7c0797ff82f6c8d70b1951e64a3f83750c81 (diff)
fix printf format conversion specifiers
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--compile.c2
-rw-r--r--ext/bigdecimal/bigdecimal.c10
-rw-r--r--ext/sdbm/_sdbm.c8
-rw-r--r--regexec.c6
4 files changed, 13 insertions, 13 deletions
diff --git a/compile.c b/compile.c
index ac8fad9..d69dab6 100644
--- a/compile.c
+++ b/compile.c
@@ -5652,7 +5652,7 @@ dump_disasm_list(struct iseq_link_element *link)
{
iobj = (INSN *)link;
str = insn_data_to_s_detail(iobj);
- printf("%04d %-65s(%4d)\n", pos, StringValueCStr(str), iobj->line_no);
+ printf("%04d %-65s(%4u)\n", pos, StringValueCStr(str), iobj->line_no);
pos += insn_data_length(iobj);
break;
}
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index 79dffa4..8ee9d4a 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -4842,11 +4842,11 @@ out_side:
space_error:
#ifdef BIGDECIMAL_DEBUG
if (gfDebug) {
- printf(" word_a=%lu\n", word_a);
- printf(" word_b=%lu\n", word_b);
- printf(" word_c=%lu\n", word_c);
- printf(" word_r=%lu\n", word_r);
- printf(" ind_r =%lu\n", ind_r);
+ printf(" word_a=%"PRIuSIZE"\n", word_a);
+ printf(" word_b=%"PRIuSIZE"\n", word_b);
+ printf(" word_c=%"PRIuSIZE"\n", word_c);
+ printf(" word_r=%"PRIuSIZE"\n", word_r);
+ printf(" ind_r =%"PRIuSIZE"\n", ind_r);
}
#endif /* BIGDECIMAL_DEBUG */
rb_bug("ERROR(VpDivd): space for remainder too small.");
diff --git a/ext/sdbm/_sdbm.c b/ext/sdbm/_sdbm.c
index 847eb2a..3c9cb31 100644
--- a/ext/sdbm/_sdbm.c
+++ b/ext/sdbm/_sdbm.c
@@ -507,7 +507,7 @@ getpage(register DBM *db, register long int hash)
while (dbit < db->maxbno && getdbit(db, dbit))
dbit = 2 * dbit + ((hash & ((long) 1 << hbit++)) ? 2 : 1);
- debug(("dbit: %d...", dbit));
+ debug(("dbit: %ld...", dbit));
db->curbit = dbit;
db->hmask = masks[hbit];
@@ -532,7 +532,7 @@ getpage(register DBM *db, register long int hash)
}
db->pagbno = pagb;
- debug(("pag read: %d\n", pagb));
+ debug(("pag read: %ld\n", pagb));
}
return 1;
}
@@ -552,7 +552,7 @@ getdbit(register DBM *db, register long int dbit)
return 0;
db->dirbno = dirb;
- debug(("dir read: %d\n", dirb));
+ debug(("dir read: %ld\n", dirb));
}
return db->dirbuf[c % DBLKSIZ] & (1 << (dbit % BYTESIZ));
@@ -573,7 +573,7 @@ setdbit(register DBM *db, register long int dbit)
return 0;
db->dirbno = dirb;
- debug(("dir read: %d\n", dirb));
+ debug(("dir read: %ld\n", dirb));
}
db->dirbuf[c % DBLKSIZ] |= (1 << (dbit % BYTESIZ));
diff --git a/regexec.c b/regexec.c
index 1336468..1ec337f 100644
--- a/regexec.c
+++ b/regexec.c
@@ -1292,7 +1292,7 @@ onig_print_statistics(FILE* f)
int i;
fprintf(f, " count prev time\n");
for (i = 0; OnigOpInfo[i].opcode >= 0; i++) {
- fprintf(f, "%8d: %8d: %10ld: %s\n",
+ fprintf(f, "%8d: %8d: %10lu: %s\n",
OpCounter[i], OpPrevCounter[i], OpTime[i], OnigOpInfo[i].name);
}
fprintf(f, "\nmax stack depth: %d\n", MaxStackDepth);
@@ -4290,7 +4290,7 @@ onig_search_gpos(regex_t* reg, const UChar* str, const UChar* end,
#ifdef ONIG_DEBUG
if (r != ONIG_MISMATCH)
- fprintf(stderr, "onig_search: error %"PRIdPTR"\n", r);
+ fprintf(stderr, "onig_search: error %"PRIdPTRDIFF"\n", r);
#endif
return r;
@@ -4300,7 +4300,7 @@ onig_search_gpos(regex_t* reg, const UChar* str, const UChar* end,
ONIG_STATE_DEC_THREAD(reg);
#ifdef ONIG_DEBUG
if (r != ONIG_MISMATCH)
- fprintf(stderr, "onig_search: error %"PRIdPTR"\n", r);
+ fprintf(stderr, "onig_search: error %"PRIdPTRDIFF"\n", r);
#endif
return r;