lsvpd/lsvpd-52793604fa715cd352ef9ba488f8215afee8bb73.patch
Than Ngo 01c6952697 - rebase to 1.7.12
- add support for SCSI loc-code
- Fix catching polymorphic type by value
2021-09-03 14:48:27 +02:00

29 lines
1.1 KiB
Diff

commit 52793604fa715cd352ef9ba488f8215afee8bb73
Author: Kamalesh Babulal <kamalesh@linux.ibm.com>
Date: Tue Jun 8 18:53:05 2021 +0530
lsmcode: Fix catching polymorphic type by value
Fix the compile time warning:
src/output/lsmcode.cpp: In function 'std::string read_dt_property(const string&, const string&)':
src/output/lsmcode.cpp:181:39: warning: catching polymorphic type 'class std::ios_base::failure' by value [-Wcatch-value=]
181 | catch (std::ifstream::failure e) {
| ^
Signed-off-by: Kamalesh Babulal <kamalesh@linux.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
diff --git a/src/output/lsmcode.cpp b/src/output/lsmcode.cpp
index 557c008..4928461 100644
--- a/src/output/lsmcode.cpp
+++ b/src/output/lsmcode.cpp
@@ -178,7 +178,7 @@ static string read_dt_property(const string& path, const string& attrName)
try {
attrIn.open( fullPath.c_str( ) );
}
- catch (std::ifstream::failure e) {
+ catch (std::ifstream::failure &e) {
ostringstream os;
os << "Error opening " << fullPath;
Logger().log(os.str( ), LOG_WARNING);