iniwf / webm

Automatically exported from code.google.com/p/webm
0 stars 0 forks source link

-Wpointer-bool-conversion from clang compiler #894

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What is the expected behavior? What do you see instead?

When compiled with clang/llvm compiler, the comparison of array with null 
pointer is given a -Wpointer-bool-conversion warning. Could we change the 
source code to avoid such comparisons?

What version are you using? On what operating system?

I am testing with an older version in Android Open Source Project on Linux with 
code like:

static int mvsad_err_cost(const MACROBLOCK *x, const MV *mv, const MV *ref,
                          int error_per_bit) {
  if (x->nmvsadcost) {    // nmvsadcost is an array.

In version 1.3.0, I am still seeing such pattern:

static int mvsad_err_cost(const MV *mv, const MV *ref,
                          const int *mvjsadcost, int *mvsadcost[2],
                          int error_per_bit) {
  if (mvsadcost) {

Original issue reported on code.google.com by c...@google.com on 9 Dec 2014 at 11:42

GoogleCodeExporter commented 9 years ago
Does the issue still exist with latest git?

Original comment by johannko...@google.com on 10 Dec 2014 at 1:19

GoogleCodeExporter commented 9 years ago

Original comment by ya...@google.com on 15 Jan 2015 at 11:21