Skip to content

Commit 2a77172

Browse files
committed
testing: Misc fixes to address or suppress Sonar warnings
Signed-off-by: Larry Gritz <[email protected]>
1 parent f246e9f commit 2a77172

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/libutil/sysutil.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -552,9 +552,8 @@ Sysutil::put_in_background(int argc, char* argv[])
552552
// Simplest case:
553553
// daemon returns 0 if successful, thus return true if successful
554554
return daemon(1, 1) == 0;
555-
#endif
556555

557-
#if defined(__APPLE__) && TARGET_OS_OSX
556+
#elif defined(__APPLE__) && TARGET_OS_OSX
558557
std::string newcmd = std::string(argv[0]) + " -F";
559558
for (int i = 1; i < argc; ++i) {
560559
newcmd += " \"";
@@ -565,14 +564,14 @@ Sysutil::put_in_background(int argc, char* argv[])
565564
if (system(newcmd.c_str()) != -1)
566565
exit(0);
567566
return true;
568-
#endif
569567

570-
#ifdef _WIN32
568+
#elif defined(_WIN32)
571569
return true;
572-
#endif
573570

571+
#else
574572
// Otherwise, we don't know what to do
575573
return false;
574+
#endif
576575
}
577576

578577

src/openexr.imageio/exrinput.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,6 +1209,7 @@ OpenEXRInput::read_native_scanlines(int subimage, int miplevel, int ybegin,
12091209
m_input_rgba->readPixels(ybegin, yend - 1);
12101210

12111211
// FIXME There is probably some optimized code for this somewhere.
1212+
OIIO_DASSERT(chbegin >= 0 && chend > chbegin);
12121213
for (int c = chbegin; c < chend; ++c) {
12131214
size_t chanbytes = m_spec.channelformat(c).size();
12141215
half* src = &pixels[0][0].r + c;

0 commit comments

Comments
 (0)