Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7df39fbd authored by Colin Cross's avatar Colin Cross Committed by android-build-merger
Browse files

Merge "Fix warnings in system/ headers" am: d7f60fd8 am: 299df0bf am: 88fd7e2e

am: bd45ba69

Change-Id: I3f643d2586ca0fa2eec0411f5995eca74308775c
parents 55285309 bd45ba69
Loading
Loading
Loading
Loading
+13 −6
Original line number Original line Diff line number Diff line
@@ -452,15 +452,15 @@ typedef enum android_pixel_format {
 *
 *
 * Buffers must have a 8 bit depth.
 * Buffers must have a 8 bit depth.
 *
 *
 * @y, @cb, and @cr point to the first byte of their respective planes.
 * y, cb, and cr point to the first byte of their respective planes.
 *
 *
 * Stride describes the distance in bytes from the first value of one row of
 * Stride describes the distance in bytes from the first value of one row of
 * the image to the first value of the next row.  It includes the width of the
 * the image to the first value of the next row.  It includes the width of the
 * image plus padding.
 * image plus padding.
 * @ystride is the stride of the luma plane.
 * ystride is the stride of the luma plane.
 * @cstride is the stride of the chroma planes.
 * cstride is the stride of the chroma planes.
 *
 *
 * @chroma_step is the distance in bytes from one chroma pixel value to the
 * chroma_step is the distance in bytes from one chroma pixel value to the
 * next.  This is 2 bytes for semiplanar (because chroma values are interleaved
 * next.  This is 2 bytes for semiplanar (because chroma values are interleaved
 * and each chroma value is one byte) and 1 for planar.
 * and each chroma value is one byte) and 1 for planar.
 */
 */
@@ -585,9 +585,9 @@ typedef struct android_flex_layout {
 * measurement is correct. It is between 0.f and 1.f, inclusive, with 1.f ==
 * measurement is correct. It is between 0.f and 1.f, inclusive, with 1.f ==
 * 100% confidence.
 * 100% confidence.
 *
 *
 * @num_points is the number of points in the list
 * num_points is the number of points in the list
 *
 *
 * @xyz_points is the flexible array of floating-point values.
 * xyz_points is the flexible array of floating-point values.
 *   It contains (num_points) * 4 floats.
 *   It contains (num_points) * 4 floats.
 *
 *
 *   For example:
 *   For example:
@@ -612,7 +612,14 @@ struct android_depth_points {
    /** reserved for future use, set to 0 by gralloc's (*lock)() */
    /** reserved for future use, set to 0 by gralloc's (*lock)() */
    uint32_t reserved[8];
    uint32_t reserved[8];


#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wc99-extensions"
#endif
    float xyzc_points[];
    float xyzc_points[];
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
};
};


/**
/**
+2 −2
Original line number Original line Diff line number Diff line
@@ -85,7 +85,7 @@ static int __inline__ qemu_pipe_frame_send(int fd,
                                           const void* buff,
                                           const void* buff,
                                           size_t len) {
                                           size_t len) {
    char header[5];
    char header[5];
    snprintf(header, sizeof(header), "%04x", len);
    snprintf(header, sizeof(header), "%04zu", len);
    ssize_t ret = TEMP_FAILURE_RETRY(write(fd, header, 4));
    ssize_t ret = TEMP_FAILURE_RETRY(write(fd, header, 4));
    if (ret != 4) {
    if (ret != 4) {
        QEMU_PIPE_DEBUG("Can't write qemud frame header: %s", strerror(errno));
        QEMU_PIPE_DEBUG("Can't write qemud frame header: %s", strerror(errno));
@@ -123,7 +123,7 @@ static int __inline__ qemu_pipe_frame_recv(int fd, void* buff, size_t len) {
        return -1;
        return -1;
    }
    }
    ret = TEMP_FAILURE_RETRY(read(fd, buff, size));
    ret = TEMP_FAILURE_RETRY(read(fd, buff, size));
    if (ret != size) {
    if (ret != (ssize_t)size) {
        QEMU_PIPE_DEBUG("Could not read qemud frame payload: %s",
        QEMU_PIPE_DEBUG("Could not read qemud frame payload: %s",
                        strerror(errno));
                        strerror(errno));
        return -1;
        return -1;
+4 −2
Original line number Original line Diff line number Diff line
@@ -218,7 +218,8 @@ typedef struct radio_event {
} radio_event_t;
} radio_event_t;




static radio_rds_t radio_rds_for_region(bool rds, radio_region_t region) {
static inline
radio_rds_t radio_rds_for_region(bool rds, radio_region_t region) {
    if (!rds)
    if (!rds)
        return RADIO_RDS_NONE;
        return RADIO_RDS_NONE;
    switch(region) {
    switch(region) {
@@ -234,7 +235,8 @@ static radio_rds_t radio_rds_for_region(bool rds, radio_region_t region) {
    }
    }
}
}


static radio_deemphasis_t radio_demephasis_for_region(radio_region_t region) {
static inline
radio_deemphasis_t radio_demephasis_for_region(radio_region_t region) {
    switch(region) {
    switch(region) {
        case RADIO_REGION_KOREA:
        case RADIO_REGION_KOREA:
        case RADIO_REGION_ITU_2:
        case RADIO_REGION_ITU_2:
+10 −1
Original line number Original line Diff line number Diff line
@@ -38,8 +38,17 @@ __BEGIN_DECLS


/*****************************************************************************/
/*****************************************************************************/


#ifdef __cplusplus
#define ANDROID_NATIVE_UNSIGNED_CAST(x) static_cast<unsigned int>(x)
#else
#define ANDROID_NATIVE_UNSIGNED_CAST(x) ((unsigned int)(x))
#endif

#define ANDROID_NATIVE_MAKE_CONSTANT(a,b,c,d) \
#define ANDROID_NATIVE_MAKE_CONSTANT(a,b,c,d) \
    (((unsigned)(a)<<24)|((unsigned)(b)<<16)|((unsigned)(c)<<8)|(unsigned)(d))
    ((ANDROID_NATIVE_UNSIGNED_CAST(a) << 24) | \
     (ANDROID_NATIVE_UNSIGNED_CAST(b) << 16) | \
     (ANDROID_NATIVE_UNSIGNED_CAST(c) << 8) | \
     (ANDROID_NATIVE_UNSIGNED_CAST(d)))


#define ANDROID_NATIVE_WINDOW_MAGIC \
#define ANDROID_NATIVE_WINDOW_MAGIC \
    ANDROID_NATIVE_MAKE_CONSTANT('_','w','n','d')
    ANDROID_NATIVE_MAKE_CONSTANT('_','w','n','d')