Skip to content

Commit

Permalink
Fix build error from -Werror, -Wdangling-gsl
Browse files Browse the repository at this point in the history
The prior version could return a different value every call.
  • Loading branch information
cjreynol committed Jan 30, 2025
1 parent 07ce95e commit 1474440
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions base/cvd/build_version.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
namespace android {
namespace build {

constexpr std::string_view GetBuildNumber() {
return "@VCS_TAG@";
inline std::string_view GetBuildNumber() {
static constexpr char kBuildNumber[] = "@VCS_TAG@";
return kBuildNumber;
}

} // namespace build
Expand Down

0 comments on commit 1474440

Please sign in to comment.