Changeset dc18190 in rtems


Ignore:
Timestamp:
Apr 14, 2014, 10:41:57 AM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
e1598a6
Parents:
589bbcb
git-author:
Sebastian Huber <sebastian.huber@…> (04/14/14 10:41:57)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/15/14 06:37:11)
Message:

score: Add and use RTEMS_ZERO_LENGTH_ARRAY

Location:
cpukit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libblock/include/rtems/blkdev.h

    r589bbcb rdc18190  
    143143   * List of scatter or gather buffers.
    144144   */
    145   rtems_blkdev_sg_buffer bufs[0];
     145  rtems_blkdev_sg_buffer bufs[RTEMS_ZERO_LENGTH_ARRAY];
    146146} rtems_blkdev_request;
    147147
  • cpukit/libblock/include/rtems/ide_part_table.h

    r589bbcb rdc18190  
    7979{
    8080    uint32_t   sector_num; /* sector number on the device */
    81     uint8_t    data[0]; /* raw sector data */
     81    uint8_t    data[RTEMS_ZERO_LENGTH_ARRAY]; /* raw sector data */
    8282} rtems_sector_data_t;
    8383
  • cpukit/score/include/rtems/score/basedefs.h

    r589bbcb rdc18190  
    209209#define RTEMS_ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
    210210
     211/*
     212 * Zero-length arrays are valid in C99 as flexible array members.  C++11
     213 * doesn't allow flexible array members.  Use the GNU extension which is also
     214 * supported by other compilers.
     215 */
     216#define RTEMS_ZERO_LENGTH_ARRAY 0
     217
    211218#ifndef ASM
    212219  #ifdef RTEMS_DEPRECATED_TYPES
Note: See TracChangeset for help on using the changeset viewer.