- changed status to closed
Compiling with new versions of gcc
Issue #55
closed
There are small warnings in new versions of gcc which are getting changed into errors. I can't seem to get pull requests on mercurial / bitbucket to do what I want so here it is in patch form.
diff -Naur fuse-zip/lib/fileNode.cpp fuse-zipb/lib/fileNode.cpp --- fuse-zip/lib/fileNode.cpp 2019-03-12 15:25:05.906337484 -0500 +++ fuse-zipb/lib/fileNode.cpp 2019-03-12 15:19:50.944188680 -0500 @@ -244,10 +244,10 @@ buffer = new BigBuffer(zip, id(), static_cast<size_t>(m_size)); state = OPENED; } - catch (std::bad_alloc) { + catch (std::bad_alloc&) { return -ENOMEM; } - catch (std::exception) { + catch (std::exception&) { return -EIO; } } diff -Naur fuse-zip/lib/fuse-zip.cpp fuse-zipb/lib/fuse-zip.cpp --- fuse-zip/lib/fuse-zip.cpp 2019-03-12 15:25:05.907337487 -0500 +++ fuse-zipb/lib/fuse-zip.cpp 2019-03-12 15:20:24.914312560 -0500 @@ -89,7 +89,7 @@ throw; } } - catch (std::bad_alloc) { + catch (std::bad_alloc&) { syslog(LOG_ERR, "no enough memory"); fprintf(stderr, "%s: no enough memory\n", program); return NULL; @@ -218,10 +218,10 @@ try { return node->open(); } - catch (std::bad_alloc) { + catch (std::bad_alloc&) { return -ENOMEM; } - catch (std::exception) { + catch (std::exception&) { return -EIO; } }
Comments (2)
-
repo owner -
repo owner released in version 0.6.1
- Log in to comment
fixed compilation with gcc 8.3.0 (patch from Michael Davis), closes issue
#55→ <<cset 3914ff789bab>>