Skip to content

Commit

Permalink
reduce warnings (#4794)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffrey Mendelsohn authored and GitHub Enterprise committed Jun 14, 2024
1 parent 3409f8f commit 45c229d
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 24 deletions.
2 changes: 1 addition & 1 deletion groups/bdl/bdlat/bdlat_typecategory.h
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ BSLS_IDENT("$Id: $")
// return bdlat_TypeCategory::e_SIMPLE_CATEGORY; // RETURN
// }
//
// assert(!"Reached");
// assert(0 == "Reached");
//
// // Note that this 'return' is never reached and hence the returned
// // value is immaterial.
Expand Down
8 changes: 4 additions & 4 deletions groups/bdl/bdldfp/bdldfp_decimalplatform.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ int main(int argc, char* argv[])
<< bsl::endl;

#ifndef BDLDFP_DECIMALPLATFORM_SNPRINTF_BUFFER_SIZE
ASSERT(!"BDLDFP_DECIMALPLATFORM_SNPRINTF_BUFFER_SIZE"
" is not defined!");
ASSERT(0 == "BDLDFP_DECIMALPLATFORM_SNPRINTF_BUFFER_SIZE"
" is not defined!");
#endif

// NaN macros must exist, and be valid NaN objects, by not comparing
Expand Down Expand Up @@ -605,8 +605,8 @@ int main(int argc, char* argv[])
<< "SANE CONFIGURATION" << bsl::endl
<< "==================" << bsl::endl;
#ifndef BDLDFP_DECIMALPLATFORM_SNPRINTF_BUFFER_SIZE
ASSERT(!"BDLDFP_DECIMALPLATFORM_SNPRINTF_BUFFER_SIZE"
" is not defined!");
ASSERT(0 == "BDLDFP_DECIMALPLATFORM_SNPRINTF_BUFFER_SIZE"
" is not defined!");
#endif

#ifdef BDLDFP_DECIMALPLATFORM_C99_TR
Expand Down
4 changes: 2 additions & 2 deletions groups/bdl/bdljsn/bdljsn_jsonnumber.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ BSLS_IDENT("$Id: $")
// bsl::cout << obj.value() << ": NG too small" << bsl::endl;
// } break;
// case bdljsn::JsonNumber::k_NOT_INTEGRAL: {
// assert(!"reached");
// assert(0 == "reached");
// } break;
// }
//..
Expand All @@ -289,7 +289,7 @@ BSLS_IDENT("$Id: $")
// bsl::cout << value << ": inexact: USE approximation";
// } break;
// case bdljsn::JsonNumber::k_NOT_INTEGRAL: {
// assert(!"reached");
// assert(0 == "reached");
// } break;
// }
//
Expand Down
2 changes: 1 addition & 1 deletion groups/bdl/bdlm/bdlm_metricsregistry.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ int main(int argc, char *argv[])
objPtr = new (fa) Obj(objAllocatorPtr);
} break;
default: {
BSLS_ASSERT_OPT(!"Bad allocator config.");
BSLS_ASSERT_OPT(0 == "Bad allocator config.");
} break;
}

Expand Down
12 changes: 6 additions & 6 deletions groups/bdl/bdlmt/bdlmt_threadmultiplexor.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,8 @@ int main(int argc, char *argv[])
(OQUEUE_MAX_PROC, MAX_QUEUESIZE, &tp, &ta);

if (0 != tp.start()) {
ASSERT(!"Could not start thread pool! "
"Threads cannot be created!");
ASSERT(0 == "Could not start thread pool! "
"Threads cannot be created!");
break;
}
if (veryVerbose) cout << "Thread-pool Started" << endl;
Expand Down Expand Up @@ -640,8 +640,8 @@ int main(int argc, char *argv[])
bdlmt::FixedThreadPool tp(NUM_THREADS, MAX_QUEUESIZE, &ta);

if (0 != tp.start()) {
ASSERT(!"Could not start thread pool! "
"Threads cannot be created!");
ASSERT(0 == "Could not start thread pool! "
"Threads cannot be created!");
break;
}
if (veryVerbose) cout << "Thread-pool Started" << endl;
Expand Down Expand Up @@ -709,8 +709,8 @@ int main(int argc, char *argv[])
TestQueue otherQueue(maxProc, MAX_QUEUESIZE, &tp, &ta);

if (0 != tp.start()) {
ASSERT(!"Could not start thread pool! "
"Threads cannot be created!");
ASSERT(0 == "Could not start thread pool! "
"Threads cannot be created!");
break;
}
if (veryVerbose) cout << "Thread-pool Started" << endl;
Expand Down
9 changes: 5 additions & 4 deletions groups/bsl/bslma/bslma_sharedptroutofplacerep.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,8 @@ MyAllocArgTestDeleter::MyAllocArgTestDeleter(
, d_deleter_p(original.d_deleter_p)
, d_memory_p(d_allocator_p->allocate(13))
{
ASSERT(!"'MyAllocArgTestDeleter::MyAllocArgTestDeleter(original)' should"
" not be used.");
ASSERT(0 == "'MyAllocArgTestDeleter::MyAllocArgTestDeleter(original)'"
" should not be used.");
}

MyAllocArgTestDeleter::MyAllocArgTestDeleter(
Expand Down Expand Up @@ -549,8 +549,9 @@ MyBslAllocArgTestDeleter::MyBslAllocArgTestDeleter(
, d_deleter_p(original.d_deleter_p)
, d_memory_p(d_allocator.allocate(13))
{
ASSERT(!"'MyBslAllocArgTestDeleter::MyBslAllocArgTestDeleter(original)'"
" should not be used.");
ASSERT(0 ==
"'MyBslAllocArgTestDeleter::MyBslAllocArgTestDeleter(original)'"
" should not be used.");
}

MyBslAllocArgTestDeleter::MyBslAllocArgTestDeleter(
Expand Down
4 changes: 2 additions & 2 deletions groups/bsl/bslmt/bslmt_readerwriterlockassert.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ void test()
BSLMT_READERWRITERLOCKASSERT_IS_LOCKED_READ( &rwLock);
BSLMT_READERWRITERLOCKASSERT_IS_LOCKED_WRITE(&rwLock);
} catch (bsls::AssertTestException thrown) {
ASSERT(!"Reachable")
ASSERT(0 == "Reachable")
}
#endif // BSLS_ASSERT_IS_ACTIVE

Expand Down Expand Up @@ -628,7 +628,7 @@ void test()
BSLMT_READERWRITERLOCKASSERT_IS_LOCKED_READ_OPT( &rwLock);
BSLMT_READERWRITERLOCKASSERT_IS_LOCKED_WRITE_OPT(&rwLock);
} catch (bsls::AssertTestException thrown) {
ASSERT(!"Reachable")
ASSERT(0 == "Reachable")
}
#endif // BSLS_ASSERT_OPT_IS_ACTIVE

Expand Down
2 changes: 1 addition & 1 deletion standalones/s_baltst/s_baltst_enumerated.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const char *Enumerated::toString(Enumerated::Value value)
}
}

BSLS_ASSERT(!"invalid enumerator");
BSLS_ASSERT(0 == "invalid enumerator");
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion standalones/s_baltst/s_baltst_myenumeration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const char *MyEnumeration::toString(MyEnumeration::Value value)
}
}

BSLS_ASSERT(!"invalid enumerator");
BSLS_ASSERT(0 == "invalid enumerator");
return 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const char *MyEnumerationUnpreservedWithFallback::toString(MyEnumerationUnpreser
}
}

BSLS_ASSERT(!"invalid enumerator");
BSLS_ASSERT(0 == "invalid enumerator");
return 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const char *MyEnumerationWithFallback::toString(MyEnumerationWithFallback::Value
}
}

BSLS_ASSERT(!"invalid enumerator");
BSLS_ASSERT(0 == "invalid enumerator");
return 0;
}

Expand Down

0 comments on commit 45c229d

Please sign in to comment.