diff options
| author | Chih-Hung Hsieh <[email protected]> | 2015-09-04 10:13:02 -0700 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2015-09-07 15:04:22 +0200 |
| commit | 2ec957327cdfae6cee592a52958a9c937ea4b13c (patch) | |
| tree | 5a7a5f5c8314ec191aa24693baddd8ef13f7b286 /tests/asm-tst2.c | |
| parent | c3f93ad84e653a23a66d8fa4110292ed900ede25 (diff) | |
Replace printf %Z length modifier with %z.
%Z is a GNU extension predating the ISO C99 %z modifier supported by
libc5 and no longer recommended.
Signed-off-by: Chih-Hung Hsieh <[email protected]>
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'tests/asm-tst2.c')
| -rw-r--r-- | tests/asm-tst2.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/asm-tst2.c b/tests/asm-tst2.c index 41bf13ae..2556d0c4 100644 --- a/tests/asm-tst2.c +++ b/tests/asm-tst2.c @@ -176,7 +176,7 @@ main (void) scn = elf_getscn (elf, cnt); if (scn == NULL) { - printf ("cannot get section %Zd: %s\n", cnt, elf_errmsg (-1)); + printf ("cannot get section %zd: %s\n", cnt, elf_errmsg (-1)); result = 1; continue; } @@ -184,7 +184,7 @@ main (void) shdr = gelf_getshdr (scn, &shdr_mem); if (shdr == NULL) { - printf ("cannot get section header for section %Zd: %s\n", + printf ("cannot get section header for section %zd: %s\n", cnt, elf_errmsg (-1)); result = 1; continue; @@ -193,7 +193,7 @@ main (void) if (strcmp (elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name), scnnames[cnt]) != 0) { - printf ("section %Zd's name differs: %s vs %s\n", cnt, + printf ("section %zd's name differs: %s vs %s\n", cnt, elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name), scnnames[cnt]); result = 1; @@ -201,20 +201,20 @@ main (void) if (shdr->sh_type != (cnt == 2 ? SHT_STRTAB : SHT_PROGBITS)) { - printf ("section %Zd's type differs\n", cnt); + printf ("section %zd's type differs\n", cnt); result = 1; } if ((cnt == 1 && shdr->sh_flags != (SHF_ALLOC | SHF_WRITE)) || (cnt == 2 && shdr->sh_flags != 0)) { - printf ("section %Zd's flags differs\n", cnt); + printf ("section %zd's flags differs\n", cnt); result = 1; } if (shdr->sh_addr != 0) { - printf ("section %Zd's address differs\n", cnt); + printf ("section %zd's address differs\n", cnt); result = 1; } @@ -225,7 +225,7 @@ main (void) + strlen ("two") + 1 + strlen ("three") + 1))) { - printf ("section %Zd's offset differs\n", cnt); + printf ("section %zd's offset differs\n", cnt); result = 1; } @@ -234,32 +234,32 @@ main (void) + strlen ("three") + 1)) || (cnt == 2 && shdr->sh_size != 17)) { - printf ("section %Zd's size differs\n", cnt); + printf ("section %zd's size differs\n", cnt); result = 1; } if (shdr->sh_link != 0) { - printf ("section %Zd's link differs\n", cnt); + printf ("section %zd's link differs\n", cnt); result = 1; } if (shdr->sh_info != 0) { - printf ("section %Zd's info differs\n", cnt); + printf ("section %zd's info differs\n", cnt); result = 1; } if ((cnt == 1 && shdr->sh_addralign != 16) || (cnt != 1 && shdr->sh_addralign != 1)) { - printf ("section %Zd's addralign differs\n", cnt); + printf ("section %zd's addralign differs\n", cnt); result = 1; } if (shdr->sh_entsize != 0) { - printf ("section %Zd's entsize differs\n", cnt); + printf ("section %zd's entsize differs\n", cnt); result = 1; } } |
