Fix warnings in ExtraTests and Examples

This commit is contained in:
Martin Hořeňovský 2020-02-25 12:39:40 +01:00
parent 33b47f7309
commit d1ffaf55a1
No known key found for this signature in database
GPG key ID: DE48307B8B0D381A
8 changed files with 27 additions and 12 deletions

View file

@ -6,7 +6,7 @@
// And write tests in the same file:
#include <catch2/catch.hpp>
int Factorial( int number ) {
static int Factorial( int number ) {
return number <= 1 ? number : Factorial( number - 1 ) * number; // fail
// return number <= 1 ? 1 : Factorial( number - 1 ) * number; // pass
}