[ismrmrd] 117/177: Changed the SHA1 hash variable to be a define to pevent problems from multiple includes
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Wed Jan 14 20:02:09 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to annotated tag v1.1.0.beta.1
in repository ismrmrd.
commit 8c1896ff208006c3c5c4d38802ac5267294d2b91
Author: Michael S. Hansen <michael.hansen at nih.gov>
Date: Tue Sep 30 11:10:37 2014 -0400
Changed the SHA1 hash variable to be a define to pevent problems from multiple includes
---
info/ismrmrd_info.cpp | 2 +-
info/ismrmrd_version.in | 3 +--
libsrc/meta.cpp | 6 +++++-
libsrc/xml.cpp | 4 ++++
4 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/info/ismrmrd_info.cpp b/info/ismrmrd_info.cpp
index db480cc..bf1d390 100644
--- a/info/ismrmrd_info.cpp
+++ b/info/ismrmrd_info.cpp
@@ -5,6 +5,6 @@ int main(int argc, char** argv)
{
std::cout << "ISMRMRD VERSION INFO: " << std::endl;
std::cout << " -- version " << ISMRMRD_VERSION_MAJOR << "." << ISMRMRD_VERSION_MINOR << "." << ISMRMRD_VERSION_PATCH << std::endl;
- std::cout << " -- SHA1 " << ismrmrd_git_sha1 << std::endl;
+ std::cout << " -- SHA1 " << ISMRMRD_GIT_SHA1_HASH << std::endl;
return 0;
}
diff --git a/info/ismrmrd_version.in b/info/ismrmrd_version.in
index c33bf11..ce37a71 100644
--- a/info/ismrmrd_version.in
+++ b/info/ismrmrd_version.in
@@ -4,7 +4,6 @@
#define ISMRMRD_VERSION_MAJOR @ISMRMRD_VERSION_MAJOR@
#define ISMRMRD_VERSION_MINOR @ISMRMRD_VERSION_MINOR@
#define ISMRMRD_VERSION_PATCH @ISMRMRD_VERSION_PATCH@
-
-const char* ismrmrd_git_sha1 = "@ISMRMRD_GIT_SHA1@";
+#define ISMRMRD_GIT_SHA1_HASH "@ISMRMRD_GIT_SHA1@"
#endif //ISMRMRD_VERSION_H
diff --git a/libsrc/meta.cpp b/libsrc/meta.cpp
index b22ef97..6642442 100644
--- a/libsrc/meta.cpp
+++ b/libsrc/meta.cpp
@@ -8,7 +8,11 @@ namespace ISMRMRD
{
pugi::xml_document doc;
pugi::xml_parse_result result = doc.load(xml);
- //TODO should something be done with result?
+
+ if (!result) {
+ throw std::runtime_error("Unable to load ISMRMRD Meta XML document");
+ }
+
pugi::xml_node root = doc.child("ismrmrdMeta");
if (!root) {
diff --git a/libsrc/xml.cpp b/libsrc/xml.cpp
index 05cc400..9bc592b 100644
--- a/libsrc/xml.cpp
+++ b/libsrc/xml.cpp
@@ -196,6 +196,10 @@ namespace ISMRMRD
{
pugi::xml_document doc;
pugi::xml_parse_result result = doc.load(xml);
+
+ if (!result) {
+ throw std::runtime_error("Unable to load ISMRMRD XML header");
+ }
pugi::xml_node root = doc.child("ismrmrdHeader");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ismrmrd.git
More information about the debian-science-commits
mailing list