Skip to content

Commit a724cb5

Browse files
committed
EXSWHTEC-83 - Add return value for default branches in helper functions
1 parent 73f5c14 commit a724cb5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/catch/unit/memory/hipMemAdvise.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ static inline hipMemoryAdvise GetUnsetMemAdvice(const hipMemoryAdvise advice) {
3434
return hipMemAdviseUnsetPreferredLocation;
3535
default:
3636
assert("Invalid hipMemoryAdvise enumerator");
37+
return advice;
3738
}
3839
}
3940

@@ -47,6 +48,7 @@ static inline hipMemRangeAttribute GetMemAdviceAttr(const hipMemoryAdvise advice
4748
return hipMemRangeAttributePreferredLocation;
4849
default:
4950
assert("Invalid hipMemoryAdvise enumerator");
51+
return static_cast<hipMemRangeAttribute>(-1);
5052
}
5153
}
5254

0 commit comments

Comments
 (0)