Skip to content

[windows] Swig is building a bad "SoapySDRPYTHON_wrap.cxx" causing C4101 warning in MSVC for unreferenced local variable #449

@eabase

Description

@eabase

Compiling SoapySDR on windows, we get 1000's of warning error for a silly error, due to not sanitizing a catch() statement, in the build file: SoapySDRPYTHON_wrap.cxx from: swig\python\python3\CMakeFiles\_SoapySDR3.dir\.

This causes:

"warning C4101: 'e': unreferenced local variable"

Which comes from the following repeated catch statement:
catch (const Swig::DirectorException &e) { SWIG_fail;}

This catch condition/statement need to be replaced by:
catch([[maybe_unused]] const Swig::DirectorException &e)

Because e is not used and also can not be disabled by #pragma warning(disable:4101) as that only works on a function basis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions