From 618dce304ede09d4392093c53cc3932a87467796 Mon Sep 17 00:00:00 2001 From: David Mayerich Date: Mon, 17 Oct 2016 18:09:21 -0500 Subject: [PATCH] removed warnings from Agilent reader --- stim/envi/envi.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/stim/envi/envi.h b/stim/envi/envi.h index 6687b08..cd7e105 100644 --- a/stim/envi/envi.h +++ b/stim/envi/envi.h @@ -359,11 +359,23 @@ public: fseek(f, 9, SEEK_SET); //seek to the number of bands short b; //allocate space for the number of bands - fread(&b, sizeof(short), 1, f); //read the number of bands + size_t nread = fread(&b, sizeof(short), 1, f); //read the number of bands + if(nread != 1){ + std::cout<<"Error reading band number from Agilent file."<