Changeset 36e6631 in rtems-tools


Ignore:
Timestamp:
Mar 18, 2015, 5:44:19 AM (4 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, master
Children:
4585798
Parents:
ea749e5
git-author:
Chris Johns <chrisj@…> (03/18/15 05:44:19)
git-committer:
Chris Johns <chrisj@…> (03/18/15 06:02:40)
Message:

rtemstoolkit: Remove warning on Windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rtemstoolkit/elftoolchain/libelf/mmap_win32.c

    rea749e5 r36e6631  
    8888  if (prot & PROT_EXEC)
    8989    return MAP_FAILED;
    90  
     90
    9191  /*
    9292   * Map the protection.
     
    107107    dwDesiredAccess = FILE_MAP_WRITE;
    108108  }
    109  
    110   fh = (HANDLE) _get_osfhandle (fd);
     109
     110  fh = (HANDLE) (intptr_t) _get_osfhandle (fd);
    111111  if (fh == (HANDLE) -1)
    112112    return MAP_FAILED;
     
    134134    DWORD low;
    135135    DWORD high;
    136    
     136
    137137    low = GetFileSize (fh, &high);
    138    
     138
    139139    /*
    140140     * Low might just happen to have the value INVALID_FILE_SIZE; so we need to
     
    148148
    149149    size = (((uint64_t) high) << 32) + low;
    150    
     150
    151151    if (offset >= size)
    152152    {
     
    171171  off_hi = (DWORD)(0);
    172172  off_lo = (DWORD)(offset & 0xFFFFFFFF);
    173  
     173
    174174  /*
    175175   * For files, it would be sufficient to pass 0 as size. For anonymous maps,
     
    187187    return MAP_FAILED;
    188188  }
    189  
     189
    190190  map->data = (char *) MapViewOfFileEx (map->map_handle,
    191191                                        dwDesiredAccess,
     
    206206  map->next = map_head;
    207207  map_head = map;
    208  
     208
    209209  return map->data;
    210210}
Note: See TracChangeset for help on using the changeset viewer.