Skip to content

Build Failed Due to Warning  #2

@SharathChampzz

Description

@SharathChampzz

Warnings were treated as errors:
warning: catching polymorphic type 'class std::bad_cast' by value [-Wcatch-value=]

Here : https://github.com/samvid25/Low-Rate-TCP-DoS-Attack/blob/master/src/mesh/model/dot11s/ie-dot11s-beacon-timing.cc
Line : 209

catch (std::bad_cast)
    {
      return false;
    }

This fixed the issue : Exceptions should be caught by constant reference, not by value.

catch (std::bad_cast& bc)
  {
     std::cerr << "bad_cast caught: " << bc.what() << '\n';
     return false;
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions