Opened 15 years ago

Closed 14 years ago

#1495 closed Feature Requests (fixed)

Warnings could be suppressed in Boost.Test

Reported by: pabristow Owned by: Gennadiy Rozental
Milestone: To Be Determined Component: test
Version: Boost 1.34.1 Severity: Cosmetic
Keywords: warning supression Cc:

Description

I get some warnings that I believe really are from Boost.Test and that I suspect are unhelpful.

i:\trunk\boost/test/impl/unit_test_main.ipp(91) : warning C4310: cast truncates constant value

at

case SFK_SUBSTR:

return name.find( m_value ) != const_string::npos;

Or is this telling me something about my test values?

i:\trunk\boost\test\impl\debug.ipp(908) : warning C4702: unreachable code i:\trunk\boost\test\impl\debug.ipp(909) : warning C4702: unreachable code i:\trunk\boost\test\impl\debug.ipp(911) : warning C4702: unreachable code

I added to detail/ suppress_warnings.hpp

# pragma warning(disable: 4310) cast truncates constant value # pragma warning(disable: 4702) unreachable code

and they go away ;-)

If you agree with this, they could usefully be added?

Change History (2)

comment:1 by Gennadiy Rozental, 15 years ago

  1. what is being cast to/from?
  1. what compiler are u using? Why is it unreachable?

comment:2 by Gennadiy Rozental, 14 years ago

Resolution: fixed
Status: newclosed

(In [47156]) Suppress some warnings. Fixes #1495

Note: See TracTickets for help on using tickets.