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

Commit 13808c5a authored by Arman Uguray's avatar Arman Uguray
Browse files

gn-build: Remove all -Wno-unused-* flags from build files

This CL removes the -Wno-unused-variable, -Wno-unused-value, and
-Wno-unused-function flags from all GN build and Android.mk files
(except in test/ & tools/, which are not built using GN yet). Compile
warnings, caused by the newly enabled flags, have been fixed throughout
the code base.

Bug: 21570302

Change-Id: I1c128b62256faa17668124798341005bcd0f7315
parent 913deefe
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ bdroid_CFLAGS += -DEXPORT_SYMBOL="__attribute__((visibility(\"default\")))"
bdroid_CFLAGS += \
  -fvisibility=hidden \
  -Wall \
  -Wno-unused-parameter \
  -Wunused-but-set-variable \
  -UNDEBUG \
  -DLOG_NDEBUG=1
+0 −5
Original line number Diff line number Diff line
@@ -24,9 +24,4 @@ shared_library("audio.a2dp.default") {
    "//",
    "//utils/include",
  ]

  # TODO(armansito): Fix the warnings and remove the flag below.
  cflags = [
    "-Wno-unused-variable",
  ]
}
+4 −12
Original line number Diff line number Diff line
@@ -199,7 +199,6 @@ static int skt_connect(char *path, size_t buffer_sz)
{
    int ret;
    int skt_fd;
    struct sockaddr_un remote;
    int len;

    INFO("connect to %s (sz %zu)", path, buffer_sz);
@@ -235,8 +234,6 @@ static int skt_connect(char *path, size_t buffer_sz)
static int skt_read(int fd, void *p, size_t len)
{
    int read;
    struct pollfd pfd;
    struct timespec ts;

    FNLOG();

@@ -366,7 +363,6 @@ static int check_a2dp_ready(struct a2dp_stream_common *common)

static int a2dp_read_audio_config(struct a2dp_stream_common *common)
{
    char cmd = A2DP_CTRL_GET_AUDIO_CONFIG;
    uint32_t sample_rate;
    uint8_t channel_count;

@@ -648,8 +644,8 @@ static audio_format_t out_get_format(const struct audio_stream *stream)

static int out_set_format(struct audio_stream *stream, audio_format_t format)
{
    UNUSED(stream);
    UNUSED(format);
    struct a2dp_stream_out *out = (struct a2dp_stream_out *)stream;
    DEBUG("setting format not yet supported (0x%x)", format);
    return -ENOSYS;
}
@@ -674,8 +670,8 @@ static int out_standby(struct audio_stream *stream)

static int out_dump(const struct audio_stream *stream, int fd)
{
    UNUSED(stream);
    UNUSED(fd);
    struct a2dp_stream_out *out = (struct a2dp_stream_out *)stream;
    FNLOG();
    return 0;
}
@@ -736,9 +732,8 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs)

static char * out_get_parameters(const struct audio_stream *stream, const char *keys)
{
    UNUSED(stream);
    UNUSED(keys);
    struct a2dp_stream_out *out = (struct a2dp_stream_out *)stream;

    FNLOG();

    /* add populating param here */
@@ -1009,7 +1004,6 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
    struct a2dp_audio_device *a2dp_dev = (struct a2dp_audio_device *)dev;
    struct a2dp_stream_out *out;
    int ret = 0;
    int i;
    UNUSED(address);
    UNUSED(handle);
    UNUSED(devices);
@@ -1130,8 +1124,7 @@ static char * adev_get_parameters(const struct audio_hw_device *dev,

static int adev_init_check(const struct audio_hw_device *dev)
{
    struct a2dp_audio_device *a2dp_dev = (struct a2dp_audio_device*)dev;

    UNUSED(dev);
    FNLOG();

    return 0;
@@ -1312,7 +1305,6 @@ static int adev_open(const hw_module_t* module, const char* name,
                     hw_device_t** device)
{
    struct a2dp_audio_device *adev;
    int ret;

    INFO(" adev_open in A2dp_hw module");
    FNLOG();
+0 −3
Original line number Diff line number Diff line
@@ -115,9 +115,6 @@ static_library("bta") {
  # TODO(armansito): Remove all of the flags below, since we want to enable all
  # warnings.
  cflags = [
    "-Wno-unused-variable",
    "-Wno-unused-value",
    "-Wno-unused-function",
    "-Wno-int-to-pointer-cast",
  ]

+0 −19
Original line number Diff line number Diff line
@@ -396,25 +396,6 @@ static tBTA_AV_SCB * bta_av_alloc_scb(tBTA_AV_CHNL chnl)
    return p_ret;
}

/*******************************************************************************
**
** Function         bta_av_free_scb
**
** Description      free stream control block,
**
**
** Returns          void
**
*******************************************************************************/
static void bta_av_free_scb(tBTA_AV_SCB *p_scb)
{
    // NOTE(google) This free currently is not called
    assert(p_scb != NULL);

    list_free(p_scb->a2d_list);
    GKI_freebuf(p_scb);
}

/*******************************************************************************
*******************************************************************************/
void bta_av_conn_cback(UINT8 handle, BD_ADDR bd_addr, UINT8 event, tAVDT_CTRL *p_data)
Loading