Skip to content

GCC compiler warnings #709

@bkloppenborg

Description

@bkloppenborg

Here is a list of compiler warnings I get when compiling ArrayFire from scratch. None of them are particularly troubling:

CMake warnings:

Manually-specified variables were not used by the project (gtest):

CMAKE_CXX_FLAGS_LIBSTDCPP
-- Build files have been written to:: arrayfire/build/third_party/gtest/src/googletest-build

GCC unused variables

arrayfire/src/backend/cpu/inverse.cpp:64:9: warning: unused variable ‘out’ [-Wunused-variable]

arrayfire/src/backend/cpu/solve.cpp:85:13: warning: unused variable ‘info’ [-Wunused-variable]

arrayfire/src/backend/opencl/magma/geqrf3.cpp:81:20: warning: unused variable ‘cpu_trtri’ [-Wunused-variable]

arrayfire/src/backend/opencl/magma/unmqr.cpp:174:20: warning: variable ‘lddwork’ set but not used [-Wunused-but-set-variable]

arrayfire/src/backend/opencl/magma/ungqr.cpp:80:32: warning: variable ‘iinfo’ set but not used [-Wunused-but-set-variable]

GCC uninitialized

arrayfire/src/backend/opencl/kernel/orb.hpp: In function ‘void opencl::kernel::orb(unsigned int*, opencl::Param&, opencl::Param&, opencl::Param&, opencl::Param&, opencl::Param&, opencl::Param&, opencl::Param, float, unsigned int, float, unsigned int, bool) [with T = float; convAccT = float]’:
arrayfire/src/backend/opencl/kernel/orb.hpp:251:13: warning: ‘d_y_feat.opencl::Param::data’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         bufferFree(d_y_feat.data);
         ^
arrayfire/src/backend/opencl/kernel/orb.hpp:250:13: warning: ‘d_x_feat.opencl::Param::data’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         bufferFree(d_x_feat.data);

GCC variable formatting (potentially unnecessary debugging?):

arrayfire/examples/financial/black_scholes_options.cpp:96:69: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘dim_t {aka long long int}’ [-Wformat=]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions