From 46f9b1b23219b39df39dd41a970cd93d5eb196a2 Mon Sep 17 00:00:00 2001
From: Federico Montesino Pouzols <federico.montesino-pouzols@stfc.ac.uk>
Date: Wed, 14 Oct 2015 08:28:40 +0100
Subject: [PATCH] check retvals from fread/fseek/fsetpos/fgetpos, 1076113-20,
 re #13951

---
 Framework/DataHandling/src/LoadRaw/isisraw2.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Framework/DataHandling/src/LoadRaw/isisraw2.cpp b/Framework/DataHandling/src/LoadRaw/isisraw2.cpp
index 4029ea10496..331b26bb1f8 100644
--- a/Framework/DataHandling/src/LoadRaw/isisraw2.cpp
+++ b/Framework/DataHandling/src/LoadRaw/isisraw2.cpp
@@ -125,8 +125,13 @@ int ISISRAW2::ioRAW(FILE *file, bool from_file, bool read_data) {
 /// @param file :: The file pointer
 /// @param i :: The amount of data to skip
 void ISISRAW2::skipData(FILE *file, int i) {
-  if (i < ndes)
-    fseek(file, 4 * ddes[i].nwords, SEEK_CUR);
+  if (i < ndes) {
+    int zero = fseek(file, 4 * ddes[i].nwords, SEEK_CUR);
+    if (0 != zero) {
+      g_log.warning() << "Failed to skip data from file, with value: " << i
+                      << "\n";
+    }
+  }
 }
 
 /// Read data
-- 
GitLab