Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Merge "Fix misc-macro-parentheses warnings."
Browse files Browse the repository at this point in the history
  • Loading branch information
chih-hung authored and Gerrit Code Review committed May 16, 2016
2 parents 0cf9f2b + 4d52b43 commit 2d0b1fa
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/camera/ExampleCamera.cpp
Expand Up @@ -26,7 +26,7 @@

#include "ExampleCamera.h"

#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))

namespace default_camera_hal {

Expand Down
2 changes: 1 addition & 1 deletion modules/consumerir/consumerir.c
Expand Up @@ -22,7 +22,7 @@
#include <hardware/hardware.h>
#include <hardware/consumerir.h>

#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))

static const consumerir_freq_range_t consumerir_freqs[] = {
{.min = 30000, .max = 30000},
Expand Down
2 changes: 1 addition & 1 deletion modules/usbcamera/UsbCamera.cpp
Expand Up @@ -26,7 +26,7 @@
#include "Camera.h"
#include "UsbCamera.h"

#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))

namespace usb_camera_hal {

Expand Down
2 changes: 1 addition & 1 deletion tests/hwc/cnativewindow.c
Expand Up @@ -37,7 +37,7 @@ typedef struct ANativeWindow aWindow;
static int trace_level = 1;

#define _TRACE(n,fmt...) \
do { if (trace_level >= n) fprintf(stderr, "CNW: " fmt); } while (0)
do { if (trace_level >= (n)) fprintf(stderr, "CNW: " fmt); } while (0)

#define ERROR(fmt...) _TRACE(0, fmt)
#define INFO(fmt...) _TRACE(1, fmt)
Expand Down

0 comments on commit 2d0b1fa

Please sign in to comment.