summaryrefslogtreecommitdiffstats
authorDonald Pellegrino <dpellegr@co-login.ncsa.uiuc.edu>2010-01-21 19:00:00 (GMT)
committer Donald Pellegrino <dpellegr@co-login.ncsa.uiuc.edu>2010-01-21 19:00:00 (GMT)
commit6bfe5755d6a9b3d88032287e97681c65b7f32f0f (patch) (side-by-side diff)
tree73ca79fe8127380a155896eec2ad552c5e9cdc82
parentfdd7ad213f13cc438e62da676b47e772f4ce9c17 (diff)
downloadexp007-6bfe5755d6a9b3d88032287e97681c65b7f32f0f.zip
exp007-6bfe5755d6a9b3d88032287e97681c65b7f32f0f.tar.gz
exp007-6bfe5755d6a9b3d88032287e97681c65b7f32f0f.tar.bz2
Removed unused status variable from check_h5_error function.
-rw-r--r--src/aggregator.c10
-rw-r--r--src/assign/assign_protein_type.c24
-rw-r--r--src/error/check_h5_error.c2
-rw-r--r--src/error/check_h5_error.h2
-rw-r--r--src/load/load_influenza_aa_dat.c12
-rw-r--r--src/load/load_influenza_faa.c12
-rw-r--r--src/updator.c4
7 files changed, 35 insertions, 31 deletions
diff --git a/src/aggregator.c b/src/aggregator.c
index 4c4ca8e..200de7d 100644
--- a/src/aggregator.c
+++ b/src/aggregator.c
@@ -9,8 +9,8 @@
#include <stdio.h>
#define H5FILE "influenza.h5"
-#define INFLUENZA_AA_DAT "/home/don/exp004/genomes/INFLUENZA/influenza_aa.dat"
-#define INFLUENZA_FAA "/home/don/exp004/genomes/INFLUENZA/influenza.faa"
+#define INFLUENZA_AA_DAT "/u/ac/dpellegr/Documents/exp004/genomes/INFLUENZA/influenza_aa.dat"
+#define INFLUENZA_FAA "/u/ac/dpellegr/Documents/exp004/genomes/INFLUENZA/influenza.faa"
int
main ()
@@ -25,14 +25,14 @@ main ()
{
file_id = H5Fcreate (H5FILE, H5F_ACC_EXCL, H5P_DEFAULT, H5P_DEFAULT);
if (file_id < 0)
- check_h5_error (file_id, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
}
else
{
fclose (f);
file_id = H5Fopen (H5FILE, H5F_ACC_RDWR, H5P_DEFAULT);
if (file_id < 0)
- check_h5_error (file_id, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
}
/*
@@ -53,7 +53,7 @@ main ()
*/
herr_t status = H5Fclose (file_id);
if (status < 0)
- check_h5_error (status, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
return 0;
}
diff --git a/src/assign/assign_protein_type.c b/src/assign/assign_protein_type.c
index 1df4c8d..065880f 100644
--- a/src/assign/assign_protein_type.c
+++ b/src/assign/assign_protein_type.c
@@ -19,12 +19,12 @@
/*
* BLAST database containing all of the influenza protein sequences.
*/
-#define SEQDB "/home/don/exp004/influenzadb/influenzadb"
+#define SEQDB "/u/ac/dpellegr/Documents/exp004/influenzadb/influenzadb"
/*
* BLAST reference database of prototypical protein types.
*/
-#define REFDB "/home/don/exp004/influenzadb/proteinnames"
+#define REFDB "/u/ac/dpellegr/Documents/exp004/influenzadb/proteinnames"
#define BUFFER_LEN 50
@@ -68,7 +68,7 @@ assign_protein_type (hid_t file_id)
herr_t status = H5TBget_table_info (file_id, "influenza.faa", &faa_nfields,
&faa_nrecords);
if (status < 0)
- check_h5_error (status, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
sequence_data *faa_buf = malloc (sizeof (sequence_data) * faa_nrecords);
@@ -81,7 +81,7 @@ assign_protein_type (hid_t file_id)
status = H5TBread_table (file_id, "influenza.faa", faa_size, faa_offset,
faa_sizes, faa_buf);
if (status < 0)
- check_h5_error (status, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
/*
* Allocate memory for the new table.
@@ -115,7 +115,7 @@ assign_protein_type (hid_t file_id)
status = H5TBget_table_info (file_id, "gi_type_data", &gi_nfields,
&gi_nrecords);
if (status < 0)
- check_h5_error (status, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
printf (" Using gi_type_data cache of %i records.\n",
(int) gi_nrecords);
@@ -125,11 +125,11 @@ assign_protein_type (hid_t file_id)
status = H5TBread_table (file_id, "gi_type_data", gi_size, gi_offset,
gi_sizes, old_buf);
if (status < 0)
- check_h5_error (status, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
status = H5TBdelete_record (file_id, "gi_type_data", 0, gi_nrecords);
if (status < 0)
- check_h5_error (status, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
}
@@ -155,7 +155,7 @@ assign_protein_type (hid_t file_id)
gi_offset, gi_field_type,
chunk_size, fill_data, compress, NULL);
if (status < 0)
- check_h5_error (status, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
}
@@ -295,11 +295,11 @@ assign_protein_type (hid_t file_id)
gi_size, gi_offset, gi_sizes,
&new_buf[i - 1000]);
if (status < 0)
- check_h5_error (status, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
status = H5Fflush (file_id, H5F_SCOPE_GLOBAL);
if (status < 0)
- check_h5_error (status, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
written = i;
@@ -326,11 +326,11 @@ assign_protein_type (hid_t file_id)
}
if (status < 0)
- check_h5_error (status, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
status = H5Fflush (file_id, H5F_SCOPE_GLOBAL);
if (status < 0)
- check_h5_error (status, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
free (faa_buf);
free (old_buf);
diff --git a/src/error/check_h5_error.c b/src/error/check_h5_error.c
index d90b21f..30183fe 100644
--- a/src/error/check_h5_error.c
+++ b/src/error/check_h5_error.c
@@ -3,7 +3,7 @@
#include <stdlib.h>
void
-check_h5_error (herr_t status, const char *filename, unsigned int linenum)
+check_h5_error (const char *filename, unsigned int linenum)
{
error_at_line (EXIT_FAILURE, 0, filename, linenum,
"An error has been reported by the HDF5 API.");
diff --git a/src/error/check_h5_error.h b/src/error/check_h5_error.h
index e460e97..fa93c6b 100644
--- a/src/error/check_h5_error.h
+++ b/src/error/check_h5_error.h
@@ -7,6 +7,6 @@
* Handle errors from the HDF5 API.
*/
void
-check_h5_error (herr_t status, const char *filename, unsigned int linenum);
+check_h5_error (const char *filename, unsigned int linenum);
#endif // CHECK_H5_ERROR_H
diff --git a/src/load/load_influenza_aa_dat.c b/src/load/load_influenza_aa_dat.c
index b50fcab..bbd4f8b 100644
--- a/src/load/load_influenza_aa_dat.c
+++ b/src/load/load_influenza_aa_dat.c
@@ -5,12 +5,14 @@
* todo: Handle NULL values occuring in numeric fields.
*/
+#define _GNU_SOURCE
#include "load_influenza_aa_dat.h"
#include "error/check_error.h"
#include "error/check_h5_error.h"
#include <hdf5_hl.h>
#include <string.h>
#include <stdlib.h>
+#include <stdio.h>
#define NFIELDS (hsize_t) 11
@@ -223,18 +225,18 @@ load_influenza_aa_dat (hid_t file_id, const char *file_name)
herr_t status = H5TBget_table_info (file_id, "influenza_aa.dat",
&nfields, &nrecords);
if (status < 0)
- check_h5_error (status, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
status =
H5TBdelete_record (file_id, "influenza_aa.dat", 0, nrecords);
if (status < 0)
- check_h5_error (status, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
status =
H5TBappend_records (file_id, "influenza_aa.dat", 1, dst_size,
dst_offset, dst_sizes, &p_data);
if (status < 0)
- check_h5_error (status, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
}
/*
@@ -250,7 +252,7 @@ load_influenza_aa_dat (hid_t file_id, const char *file_name)
chunk_size, fill_data, compress,
&p_data);
if (status < 0)
- check_h5_error (status, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
}
}
@@ -260,7 +262,7 @@ load_influenza_aa_dat (hid_t file_id, const char *file_name)
H5TBappend_records (file_id, "influenza_aa.dat", 1, dst_size,
dst_offset, dst_sizes, &p_data);
if (status < 0)
- check_h5_error (status, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
}
if (running)
diff --git a/src/load/load_influenza_faa.c b/src/load/load_influenza_faa.c
index 80eb3ae..0026d11 100644
--- a/src/load/load_influenza_faa.c
+++ b/src/load/load_influenza_faa.c
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
#include "error/check_error.h"
#include "error/check_h5_error.h"
#include "load_influenza_faa.h"
@@ -6,6 +7,7 @@
#include <hdf5_hl.h>
#include <string.h>
#include <stdlib.h>
+#include <stdio.h>
void
load_influenza_faa (hid_t file_id, const char *file_name)
@@ -72,18 +74,18 @@ load_influenza_faa (hid_t file_id, const char *file_name)
H5TBget_table_info (file_id, "influenza.faa", &nfields,
&nrecords);
if (status < 0)
- check_h5_error (status, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
status =
H5TBdelete_record (file_id, "influenza.faa", 0, nrecords);
if (status < 0)
- check_h5_error (status, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
status =
H5TBappend_records (file_id, "influenza.faa", 1, dst_size,
dst_offset, dst_sizes, &p_data);
if (status < 0)
- check_h5_error (status, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
}
/*
@@ -101,7 +103,7 @@ load_influenza_faa (hid_t file_id, const char *file_name)
compress,
&p_data);
if (status < 0)
- check_h5_error (status, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
}
}
@@ -111,7 +113,7 @@ load_influenza_faa (hid_t file_id, const char *file_name)
H5TBappend_records (file_id, "influenza.faa", 1, dst_size,
dst_offset, dst_sizes, &p_data);
if (status < 0)
- check_h5_error (status, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
}
if (running)
diff --git a/src/updator.c b/src/updator.c
index 9a5ad18..f93e205 100644
--- a/src/updator.c
+++ b/src/updator.c
@@ -17,7 +17,7 @@ main ()
*/
hid_t file_id = H5Fopen (FILE, H5F_ACC_RDWR, H5P_DEFAULT);
if (file_id < 0)
- check_h5_error (file_id, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
/*
* Assign protein type values to the sequence records.
@@ -29,7 +29,7 @@ main ()
*/
herr_t status = H5Fclose (file_id);
if (status < 0)
- check_h5_error (status, __FILE__, __LINE__);
+ check_h5_error (__FILE__, __LINE__);
return 0;
}

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.