Changeset 9c12bcfd in rtems


Ignore:
Timestamp:
01/07/19 08:32:16 (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
5b951175
Parents:
956d76cc
git-author:
Sebastian Huber <sebastian.huber@…> (01/07/19 08:32:16)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/07/19 08:49:16)
Message:

Fix format warnings

Files:
8 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libdl/rtl-mdreloc-sparc.c

    r956d76cc r9c12bcfd  
    3636#include <sys/cdefs.h>
    3737
     38#include <inttypes.h>
    3839#include <stdio.h>
    3940
     
    216217    if (value != 0 && *where != 0) {
    217218      if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC))
    218         printf("rtl: reloc base_rel(%s): where=%p, *where 0x%lx, "
    219                "addend=0x%lx, base %p\n",
     219        printf("rtl: reloc base_rel(%s): where=%p, *where 0x%" PRIu32 ", "
     220               "addend=0x%" PRIu32 ", base %p\n",
    220221               rtems_rtl_obj_oname (obj),
    221222               where, *where, rela->r_addend, sect->base);
  • cpukit/libdl/rtl-obj.c

    r956d76cc r9c12bcfd  
    429429
    430430    if (rtems_rtl_trace (RTEMS_RTL_TRACE_SECTION))
    431       printf ("rtl: sect: add: %-2d: %s (%zu) 0x%08lx\n",
     431      printf ("rtl: sect: add: %-2d: %s (%zu) 0x%08" PRIu32 "\n",
    432432              section, name, size, flags);
    433433  }
  • cpukit/libmisc/rtems-fdt/rtems-fdt-shell.c

    r956d76cc r9c12bcfd  
    487487
    488488  printf ("0x%08" PRIx32 " => (value & 0x%08" PRIx32 ") == 0x%08" PRIx32 \
    489           " for %" PRIu32 " seconds\n",
     489          " for %ld seconds\n",
    490490          address, mask, test, rtems_fdt_test_timeout);
    491491
     
    534534  if (argc == 1)
    535535  {
    536     printf ("timeout: %" PRIu32 " seconds\n", rtems_fdt_test_timeout);
     536    printf ("timeout: %ld seconds\n", rtems_fdt_test_timeout);
    537537    return 0;
    538538  }
  • cpukit/libmisc/shell/main_pci.c

    r956d76cc r9c12bcfd  
    1313#endif
    1414
     15#include <inttypes.h>
    1516#include <limits.h>
    1617#include <stdlib.h>
     
    137138      result = pci_cfg_r32(pciid, offset, &data32);
    138139      if (result == PCISTS_OK)
    139         printf(" r32[0x%02x]: 0x%08lx  DEC=%lu\n", offset, data32, data32);
     140        printf(" r32[0x%02x]: 0x%08" PRIx32 "  DEC=%" PRIu32 "\n",
     141               offset, data32, data32);
    140142      break;
    141143
     
    178180      result = pci_cfg_w32(pciid, offset, data);
    179181      if (result == PCISTS_OK)
    180         printf(" w32[0x%02x]: 0x%08lx  DEC=%lu\n", offset, data, data);
     182        printf(" w32[0x%02x]: 0x%08" PRIx32 "  DEC=%" PRIu32 "\n",
     183               offset, data, data);
    181184      break;
    182185
     
    363366  printf(" SUB VENDOR:    0x%04x\n", dev->subvendor);
    364367  printf(" SUB DEVICE:    0x%04x\n", dev->subdevice);
    365   printf(" CLASS:         0x%06lx\n", dev->classrev >> 8);
    366   printf(" REVISION:      0x%02lx\n", dev->classrev & 0xff);
     368  printf(" CLASS:         0x%06" PRIx32 "\n", dev->classrev >> 8);
     369  printf(" REVISION:      0x%02" PRIx32 "\n", dev->classrev & 0xff);
    367370  printf(" IRQ:           %d\n", dev->sysirq);
    368371
     
    388391    }
    389392
    390     printf("  %s[%d]:  %08lx-%08lx\n", str1, i, res->start, res->end - 1);
     393    printf("  %s[%d]:  %08" PRIx32 "-%08" PRIx32 "\n",
     394           str1, i, res->start, res->end - 1);
    391395  }
    392396
  • cpukit/libpci/pci_bus.c

    r956d76cc r9c12bcfd  
    2727#define PCIBUS_INFO
    2828
     29#include <inttypes.h>
    2930#include <stdlib.h>
    3031#include <stdio.h>
     
    302303                        PCI_DEV_EXPAND(devinfo->pcidev));
    303304        print_line(p, buf);
    304         sprintf(buf, "PCIID        0x%lx", (uint32_t)devinfo->pcidev);
     305        sprintf(buf, "PCIID        0x%" PRIx16 "", devinfo->pcidev);
    305306        print_line(p, buf);
    306307        sprintf(buf, "VENDOR ID:   %04x", devinfo->id.vendor);
     
    312313        sprintf(buf, "SUBDEV ID:   %04x", devinfo->id.subdevice);
    313314        print_line(p, buf);
    314         sprintf(buf, "CLASS:       %lx", devinfo->id.class);
     315        sprintf(buf, "CLASS:       %" PRIx32, devinfo->id.class);
    315316        print_line(p, buf);
    316317        sprintf(buf, "REVISION:    %x", devinfo->rev);
     
    344345                        continue;
    345346
    346                 sprintf(buf, " %s[%d]:  %08lx-%08lx [PCIADR %lx]",
     347                sprintf(buf, " %s[%d]:  %08" PRIx32 "-%08" PRIx32
     348                        " [PCIADR %" PRIx32 "]",
    347349                        str1, i, pcibusres->address,
    348350                        pcibusres->address + pcibusres->size - 1, pcistart);
  • cpukit/libpci/pci_cfg_print_code.c

    r956d76cc r9c12bcfd  
    1010
    1111#include <rtems.h>
     12#include <inttypes.h>
    1213#include <stdio.h>
    1314#include <string.h>
     
    5051                printf("%s{\n", prefix);
    5152                printf("%s\t.next = NULL,\n", prefix);
    52                 printf("%s\t.size = 0x%08lx,\n", prefix, res->size);
    53                 printf("%s\t.boundary = 0x%08lx,\n", prefix, res->boundary);
     53                printf("%s\t.size = 0x%08" PRIx32 ",\n", prefix, res->size);
     54                printf("%s\t.boundary = 0x%08" PRIx32 ",\n", prefix, res->boundary);
    5455                printf("%s\t.flags = 0x%x,\n", prefix, res->flags);
    5556                printf("%s\t.bar = %d,\n", prefix, i);
    56                 printf("%s\t.start = 0x%08lx,\n", prefix, res->start);
    57                 printf("%s\t.end = 0x%08lx,\n", prefix, res->end);
     57                printf("%s\t.start = 0x%08" PRIx32 ",\n", prefix, res->start);
     58                printf("%s\t.end = 0x%08" PRIx32 ",\n", prefix, res->end);
    5859                printf("%s},\n", prefix);
    5960        }
     
    8990        printf("%s.subvendor = 0x%04x,\n", prefix, dev->subvendor);
    9091        printf("%s.subdevice = 0x%04x,\n", prefix, dev->subdevice);
    91         printf("%s.classrev = 0x%08lx,\n", prefix, dev->classrev);
     92        printf("%s.classrev = 0x%08" PRIx32 ",\n", prefix, dev->classrev);
    9293        printf("%s.command = 0,\n", prefix);
    9394}
  • cpukit/libpci/pci_print.c

    r956d76cc r9c12bcfd  
    88 */
    99
     10#include <inttypes.h>
    1011#include <stdio.h>
    1112#include <pci.h>
     
    4344        printf("\nBus %x Slot %x function: %x [0x%x] %s\n",
    4445                PCI_DEV_EXPAND(dev), dev, str);
    45         printf("\tVendor id: 0x%lx, device id: 0x%lx\n",
     46        printf("\tVendor id: 0x%" PRIx32 ", device id: 0x%" PRIx32 "\n",
    4647                id & 0xffff, id >> 16);
    4748        if (maxbars == 2) {
    4849                PCI_CFG_R32(dev, PCIR_PRIBUS_1, &tmp);
    49                 printf("\tPrimary: %lx  Secondary: %lx  Subordinate: %lx\n",
     50                printf("\tPrimary: %" PRIx32 "  Secondary: %" PRIx32
     51                        "  Subordinate: %" PRIx32 "\n",
    5052                        tmp & 0xff, (tmp >> 8) & 0xff, (tmp >> 16) & 0xff);
    5153        }
     
    8385                                tmp2 = tmp2 / (1024*1024);
    8486                        }
    85                         printf("\tBAR %d: %lx [%lu%s]\n", pos, tmp, tmp2, str);
     87                        printf("\tBAR %d: %" PRIx32 " [%" PRIu32 "%s]\n",
     88                                pos, tmp, tmp2, str);
    8689                }
    8790        }
     
    106109                }
    107110                str2 = tmp & 1 ? "ENABLED" : "DISABLED";
    108                 printf("\tROM:   %08lx [%lu%s] (%s)\n",
     111                printf("\tROM:   %08" PRIx32 " [%" PRIu32 "%s] (%s)\n",
    109112                        tmp, tmp2, str, str2);
    110113        }
     
    123126                        if (limit < base)
    124127                                str = "DISABLED";
    125                         printf("\tI/O:   BASE: 0x%08lx, LIMIT: 0x%08lx (%s)\n",
    126                                 base, limit, str);
     128                        printf("\tI/O:   BASE: 0x%08" PRIx32 ", LIMIT: 0x%08"
     129                                PRIx32 " (%s)\n", base, limit, str);
    127130                }
    128131
     
    134137                        if (limit < base)
    135138                                str = "DISABLED";
    136                         printf("\tMEMIO: BASE: 0x%08lx, LIMIT: 0x%08lx (%s)\n",
    137                                 base, limit, str);
     139                        printf("\tMEMIO: BASE: 0x%08" PRIx32 ", LIMIT: 0x%08"
     140                                PRIx32 " (%s)\n", base, limit, str);
    138141                }
    139142
     
    145148                        if (limit < base)
    146149                                str = "DISABLED";
    147                         printf("\tMEM:   BASE: 0x%08lx, LIMIT: 0x%08lx (%s)\n",
    148                                         base, limit, str);
     150                        printf("\tMEM:   BASE: 0x%08" PRIx32 ", LIMIT: 0x%08"
     151                                PRIx32 " (%s)\n", base, limit, str);
    149152                }
    150153        }
  • testsuites/fstests/fsrfsbitmap01/test.c

    r956d76cc r9c12bcfd  
    4949    if (rc > 0)
    5050    {
    51       printf (" %2d. Test bit %" PRId32 " in range (%" PRId32 ",%ld] is %s: ",
     51      printf (" %2d. Test bit %" PRId32 " in range (%" PRId32 ",%zu] is %s: ",
    5252            test, bit + count, bit, bit + size - 1, !set ? "set" : "clear");
    5353      printf ("FAIL (%s)\n", strerror (rc));
     
    5858    if (!result)
    5959    {
    60       printf (" %2d. Test bit %" PRId32 " in range (%" PRId32 ",%ld] is %s: ",
     60      printf (" %2d. Test bit %" PRId32 " in range (%" PRId32 ",%zu] is %s: ",
    6161              test, bit + count, bit, bit + size - 1, !set ? "set" : "clear");
    6262      printf (" %s\n", !result ? "pass" : "FAIL");
     
    6565  }
    6666
    67   printf (" %2d. Test bit range (%" PRId32 ",%ld] all %s: pass\n",
     67  printf (" %2d. Test bit range (%" PRId32 ",%zu] all %s: pass\n",
    6868          test, bit, bit + size - 1, set ? "set" : "clear");
    6969
     
    9292    rtems_rfs_bitmap_map_clear (control, bit + i);
    9393
    94   printf (" %2d. Cleared bits (%" PRId32 ", %ld] (%zd)\n",
     94  printf (" %2d. Cleared bits (%" PRId32 ", %zu] (%zu)\n",
    9595          test, bit, bit + size - 1, size);
    9696
     
    129129  }
    130130
    131   printf (" %2d. Alloc'ed all bits (%" PRId32 ", %ld] (%zd)\n",
     131  printf (" %2d. Alloc'ed all bits (%" PRId32 ", %zu] (%zu)\n",
    132132          test, bit, bit + size - 1, size);
    133133
     
    185185  handle.bnum = 1;
    186186
    187   printf ("\nRFS Bitmap Test : size = %zd (%zd)\n",
     187  printf ("\nRFS Bitmap Test : size = %zu (%zu)\n",
    188188          size, rtems_rfs_bitmap_elements (size));
    189189
     
    221221  rc = rtems_rfs_bitmap_map_alloc (&control, size - 1, &result, &bit);
    222222  result = result && (bit == (size - 1));
    223   printf ("  4. Find bit (size - 1) with seed = (size - 1) (%zd): %s (%s): bit = %" PRId32 "\n",
     223  printf ("  4. Find bit (size - 1) with seed = (size - 1) (%zu): %s (%s): bit = %" PRId32 "\n",
    224224          size - 1, result ? "pass" : "FAIL", strerror (rc), bit);
    225225  rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
     
    234234
    235235  rc = rtems_rfs_bitmap_map_test (&control, size - 1, &result);
    236   printf ("  6. Test bit (size - 1) (%zd): %s (%s)\n",
     236  printf ("  6. Test bit (size - 1) (%zu): %s (%s)\n",
    237237          size - 1, result ? "pass" : "FAIL", strerror (rc));
    238238  rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
     
    285285
    286286  rc = rtems_rfs_bitmap_map_clear (&control, size - 1);
    287   printf (" 14. Clear bit (size - 1) (%zd): %s (%s)\n",
     287  printf (" 14. Clear bit (size - 1) (%zu): %s (%s)\n",
    288288          size - 1, rc == 0 ? "pass" : "FAIL", strerror (rc));
    289289  rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer);
     
    301301  rc = rtems_rfs_bitmap_map_alloc (&control, size / 2, &result, &bit);
    302302  result = result && (bit == 0);
    303   printf (" 17. Find bit with seed = (size / 2) (%zd): %s (%s): bit = %" PRId32 "\n",
     303  printf (" 17. Find bit with seed = (size / 2) (%zu): %s (%s): bit = %" PRId32 "\n",
    304304          size / 2, result ? "pass" : "FAIL", strerror (rc), bit);
    305305  rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
    306306
    307307  rc = rtems_rfs_bitmap_map_clear (&control, size - 1);
    308   printf (" 18. Clear bit (size - 1) (%zd): %s, (%s)\n",
     308  printf (" 18. Clear bit (size - 1) (%zu): %s, (%s)\n",
    309309          size - 1, rc == 0 ? "pass" : "FAIL", strerror (rc));
    310310  rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer);
     
    312312  rc = rtems_rfs_bitmap_map_alloc (&control, size / 2, &result, &bit);
    313313  result = result && (bit == (size - 1));
    314   printf (" 19. Find bit with seed = (size / 2) (%zd): %s (%s): bit = %" PRId32 "\n",
     314  printf (" 19. Find bit with seed = (size / 2) (%zu): %s (%s): bit = %" PRId32 "\n",
    315315          size / 2, result ? "pass" : "FAIL", strerror (rc), bit);
    316316  rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
     
    322322  rc = rtems_rfs_bitmap_map_alloc (&control, (size / 2) - 1, &result, &bit);
    323323  result = result && (bit == 0);
    324   printf (" 21. Find bit with seed = ((size / 2) - 1) (%zd): %s (%s): bit = %" PRId32 "\n",
     324  printf (" 21. Find bit with seed = ((size / 2) - 1) (%zu): %s (%s): bit = %" PRId32 "\n",
    325325          (size / 2) - 1, result ? "pass" : "FAIL", strerror (rc), bit);
    326326  rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
    327327
    328328  rc = rtems_rfs_bitmap_map_clear (&control, size - 1);
    329   printf (" 22. Clear bit (size - 1) (%zd): %s (%s)\n",
     329  printf (" 22. Clear bit (size - 1) (%zu): %s (%s)\n",
    330330          size - 1, rc == 0 ? "pass" : "FAIL", strerror (rc));
    331331
    332332  rc = rtems_rfs_bitmap_map_alloc (&control, (size / 2) - 1, &result, &bit);
    333333  result = result && (bit == (size - 1));
    334   printf (" 23. Find bit with seed = ((size / 2) - 1) (%zd): %s (%s): bit = %" PRId32 "\n",
     334  printf (" 23. Find bit with seed = ((size / 2) - 1) (%zu): %s (%s): bit = %" PRId32 "\n",
    335335          (size / 2) - 1, result ? "pass" : "FAIL", strerror (rc), bit);
    336336  rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer);
     
    373373  clear = rtems_rfs_bitmap_map_free (&control);
    374374  result = clear == (last_bit - first_bit);
    375   printf (" 27. Check free count is %zd: %" PRId32 ": %s (%s)\n",
     375  printf (" 27. Check free count is %zu: %" PRId32 ": %s (%s)\n",
    376376          clear, last_bit - first_bit,
    377377          result ? "pass" : "FAIL", strerror (rc));
     
    379379  rc = rtems_rfs_bitmap_create_search (&control);
    380380  result = clear == rtems_rfs_bitmap_map_free (&control);
    381   printf (" 28. Create search check free count is %zd: %zd: %s (%s)\n",
     381  printf (" 28. Create search check free count is %zu: %zu: %s (%s)\n",
    382382          clear, rtems_rfs_bitmap_map_free (&control),
    383383          result ? "pass" : "FAIL", strerror (rc));
     
    455455  printf (" Bit set value       : %d\n", RTEMS_RFS_BITMAP_BIT_SET);
    456456  printf (" Bit clear value     : %d\n", RTEMS_RFS_BITMAP_BIT_CLEAR);
    457   printf (" Num bit per element : %zd\n", rtems_rfs_bitmap_element_bits ());
     457  printf (" Num bit per element : %zu\n", rtems_rfs_bitmap_element_bits ());
    458458
    459459#if INT_MAX >= 0x23984237
Note: See TracChangeset for help on using the changeset viewer.