Skip to content

Commit b33c236

Browse files
committed
Fix warnings
1 parent 3ee1302 commit b33c236

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

simplecpp.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4032,6 +4032,7 @@ const char *simplecpp::getCStdName(cstd_t std)
40324032
case C23: return "C23";
40334033
case C2Y: return "C2Y";
40344034
}
4035+
return "";
40354036
}
40364037

40374038
std::string simplecpp::getCStdString(cstd_t std)
@@ -4098,6 +4099,7 @@ const char *simplecpp::getCppStdName(cppstd_t std)
40984099
case CPP23: return "C++23";
40994100
case CPP26: return "C++26";
41004101
}
4102+
return "";
41014103
}
41024104

41034105
std::string simplecpp::getCppStdString(cppstd_t std)

test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2909,7 +2909,7 @@ static void lineDirective()
29092909
}
29102910
}
29112911

2912-
for (const std::string std : {"c99", "c++11", "c++14", "c++17", "c++20", "c++23"}) {
2912+
for (const std::string std : {"c99", "c11", "c17", "c23", "c2y", "c++11", "c++14", "c++17", "c++20", "c++23"}) {
29132913
std::string std_name;
29142914
if (simplecpp::getCStd(std) != simplecpp::CUnknown)
29152915
std_name = simplecpp::getCStdName(simplecpp::getCStd(std));

0 commit comments

Comments
 (0)