Changeset 57f96b9 in rtems


Ignore:
Timestamp:
Nov 24, 2017, 2:26:38 PM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
e58e29fd
Parents:
54e7b81
git-author:
Sebastian Huber <sebastian.huber@…> (11/24/17 14:26:38)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/24/17 14:27:01)
Message:

libtests/malloctest: Fix 64-bit targets

Update #3082.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/libtests/malloctest/init.c

    r54e7b81 r57f96b9  
    11741174{
    11751175  void *p1;
    1176   int i;
     1176  size_t i;
    11771177  int sc;
    11781178  int maximumShift;
     
    12001200  maximumShift = (sizeof(size_t) * CHAR_BIT) - 1;
    12011201  for ( i=sizeof(void *) ; i<maximumShift ; i++ ) {
    1202     size_t alignment = 1 << i;
     1202    size_t alignment = 1;
     1203
     1204    alignment <<= i;
    12031205
    12041206    p1 = NULL; /* Initialize p1 to aovid used uninitialized */
    12051207
    1206     printf( "posix_memalign - alignment of %zd -- OK\n", alignment);
     1208    printf( "posix_memalign - alignment of %zu -- OK\n", alignment);
    12071209    sc = posix_memalign( &p1, alignment, 8 );
    12081210    if ( sc == ENOMEM ) {
    1209       printf( "posix_memalign - ran out of memory trying %zd\n", alignment );
     1211      printf( "posix_memalign - ran out of memory trying %zu\n", alignment );
    12101212      break;
    12111213    }
Note: See TracChangeset for help on using the changeset viewer.