Skip to content

Commit 45c229d

Browse files
Jeffrey MendelsohnGitHub Enterprise
authored andcommitted
reduce warnings (#4794)
1 parent 3409f8f commit 45c229d

11 files changed

+25
-24
lines changed

groups/bdl/bdlat/bdlat_typecategory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ BSLS_IDENT("$Id: $")
794794
// return bdlat_TypeCategory::e_SIMPLE_CATEGORY; // RETURN
795795
// }
796796
//
797-
// assert(!"Reached");
797+
// assert(0 == "Reached");
798798
//
799799
// // Note that this 'return' is never reached and hence the returned
800800
// // value is immaterial.

groups/bdl/bdldfp/bdldfp_decimalplatform.t.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ int main(int argc, char* argv[])
185185
<< bsl::endl;
186186

187187
#ifndef BDLDFP_DECIMALPLATFORM_SNPRINTF_BUFFER_SIZE
188-
ASSERT(!"BDLDFP_DECIMALPLATFORM_SNPRINTF_BUFFER_SIZE"
189-
" is not defined!");
188+
ASSERT(0 == "BDLDFP_DECIMALPLATFORM_SNPRINTF_BUFFER_SIZE"
189+
" is not defined!");
190190
#endif
191191

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

612612
#ifdef BDLDFP_DECIMALPLATFORM_C99_TR

groups/bdl/bdljsn/bdljsn_jsonnumber.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ BSLS_IDENT("$Id: $")
268268
// bsl::cout << obj.value() << ": NG too small" << bsl::endl;
269269
// } break;
270270
// case bdljsn::JsonNumber::k_NOT_INTEGRAL: {
271-
// assert(!"reached");
271+
// assert(0 == "reached");
272272
// } break;
273273
// }
274274
//..
@@ -289,7 +289,7 @@ BSLS_IDENT("$Id: $")
289289
// bsl::cout << value << ": inexact: USE approximation";
290290
// } break;
291291
// case bdljsn::JsonNumber::k_NOT_INTEGRAL: {
292-
// assert(!"reached");
292+
// assert(0 == "reached");
293293
// } break;
294294
// }
295295
//

groups/bdl/bdlm/bdlm_metricsregistry.t.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ int main(int argc, char *argv[])
895895
objPtr = new (fa) Obj(objAllocatorPtr);
896896
} break;
897897
default: {
898-
BSLS_ASSERT_OPT(!"Bad allocator config.");
898+
BSLS_ASSERT_OPT(0 == "Bad allocator config.");
899899
} break;
900900
}
901901

groups/bdl/bdlmt/bdlmt_threadmultiplexor.t.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,8 @@ int main(int argc, char *argv[])
535535
(OQUEUE_MAX_PROC, MAX_QUEUESIZE, &tp, &ta);
536536

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

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

711711
if (0 != tp.start()) {
712-
ASSERT(!"Could not start thread pool! "
713-
"Threads cannot be created!");
712+
ASSERT(0 == "Could not start thread pool! "
713+
"Threads cannot be created!");
714714
break;
715715
}
716716
if (veryVerbose) cout << "Thread-pool Started" << endl;

groups/bsl/bslma/bslma_sharedptroutofplacerep.t.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,8 @@ MyAllocArgTestDeleter::MyAllocArgTestDeleter(
441441
, d_deleter_p(original.d_deleter_p)
442442
, d_memory_p(d_allocator_p->allocate(13))
443443
{
444-
ASSERT(!"'MyAllocArgTestDeleter::MyAllocArgTestDeleter(original)' should"
445-
" not be used.");
444+
ASSERT(0 == "'MyAllocArgTestDeleter::MyAllocArgTestDeleter(original)'"
445+
" should not be used.");
446446
}
447447

448448
MyAllocArgTestDeleter::MyAllocArgTestDeleter(
@@ -549,8 +549,9 @@ MyBslAllocArgTestDeleter::MyBslAllocArgTestDeleter(
549549
, d_deleter_p(original.d_deleter_p)
550550
, d_memory_p(d_allocator.allocate(13))
551551
{
552-
ASSERT(!"'MyBslAllocArgTestDeleter::MyBslAllocArgTestDeleter(original)'"
553-
" should not be used.");
552+
ASSERT(0 ==
553+
"'MyBslAllocArgTestDeleter::MyBslAllocArgTestDeleter(original)'"
554+
" should not be used.");
554555
}
555556

556557
MyBslAllocArgTestDeleter::MyBslAllocArgTestDeleter(

groups/bsl/bslmt/bslmt_readerwriterlockassert.t.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ void test()
584584
BSLMT_READERWRITERLOCKASSERT_IS_LOCKED_READ( &rwLock);
585585
BSLMT_READERWRITERLOCKASSERT_IS_LOCKED_WRITE(&rwLock);
586586
} catch (bsls::AssertTestException thrown) {
587-
ASSERT(!"Reachable")
587+
ASSERT(0 == "Reachable")
588588
}
589589
#endif // BSLS_ASSERT_IS_ACTIVE
590590

@@ -628,7 +628,7 @@ void test()
628628
BSLMT_READERWRITERLOCKASSERT_IS_LOCKED_READ_OPT( &rwLock);
629629
BSLMT_READERWRITERLOCKASSERT_IS_LOCKED_WRITE_OPT(&rwLock);
630630
} catch (bsls::AssertTestException thrown) {
631-
ASSERT(!"Reachable")
631+
ASSERT(0 == "Reachable")
632632
}
633633
#endif // BSLS_ASSERT_OPT_IS_ACTIVE
634634

standalones/s_baltst/s_baltst_enumerated.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const char *Enumerated::toString(Enumerated::Value value)
101101
}
102102
}
103103

104-
BSLS_ASSERT(!"invalid enumerator");
104+
BSLS_ASSERT(0 == "invalid enumerator");
105105
return 0;
106106
}
107107

standalones/s_baltst/s_baltst_myenumeration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const char *MyEnumeration::toString(MyEnumeration::Value value)
9191
}
9292
}
9393

94-
BSLS_ASSERT(!"invalid enumerator");
94+
BSLS_ASSERT(0 == "invalid enumerator");
9595
return 0;
9696
}
9797

standalones/s_baltst/s_baltst_myenumerationunpreservedwithfallback.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const char *MyEnumerationUnpreservedWithFallback::toString(MyEnumerationUnpreser
101101
}
102102
}
103103

104-
BSLS_ASSERT(!"invalid enumerator");
104+
BSLS_ASSERT(0 == "invalid enumerator");
105105
return 0;
106106
}
107107

0 commit comments

Comments
 (0)