Commit b3007925 authored by Rob Latham's avatar Rob Latham
Browse files

warning fixes with --enable-strict

another round of strict warning cleanups before the release:  missing
prototypes and shadowed declarations
parent 07a30168
......@@ -16,6 +16,7 @@
#include "adio.h"
#include "adio_cb_config_list.h"
#include "ad_gpfs.h"
#include "ad_gpfs_aggrs.h"
#ifdef AGGREGATION_PROFILE
#include "mpe.h"
......
......@@ -12,6 +12,7 @@
* See COPYRIGHT notice in top-level directory.
*/
#include "ad_gpfs.h"
#include "ad_gpfs_tuning.h"
#include <unistd.h>
......
......@@ -12,6 +12,7 @@
* See COPYRIGHT notice in top-level directory.
*/
#include "ad_gpfs.h"
#include "ad_gpfs_tuning.h"
#include <sys/types.h>
......@@ -28,7 +29,7 @@
#endif
#ifdef HAVE_GPFS_FCNTL_H
void gpfs_free_all_locks(int fd)
static void gpfs_free_all_locks(int fd)
{
int rc;
struct {
......
......@@ -279,9 +279,9 @@ void ADIOI_GPFS_ReadStridedColl(ADIO_File fd, void *buf, int count,
*
* First verify that the filetype is contig and the offsets are
* increasing in rank order*/
int i, inOrderAndNoGaps = 1;
for (i=0;i<(nprocs-1);i++) {
if (end_offsets[i] != (st_offsets[i+1]-1))
int x, inOrderAndNoGaps = 1;
for (x=0;x<(nprocs-1);x++) {
if (end_offsets[x] != (st_offsets[x+1]-1))
inOrderAndNoGaps = 0;
}
if (inOrderAndNoGaps && buftype_is_contig) {
......
......@@ -85,7 +85,7 @@ extern int gpfsmpio_bg_nagg_pset;
/* set internal variables for tuning environment variables */
void ad_gpfs_get_env_vars();
void ad_gpfs_get_env_vars(void);
/* report timing breakdown for MPI I/O collective call */
void ad_gpfs_timing_crw_report( int rw, ADIO_File fd, int myrank, int nprocs );
......@@ -96,9 +96,9 @@ void ad_gpfs_timing_crw_report( int rw, ADIO_File fd, int myrank, int nprocs );
*/
#define GPFSMPIO_T_CIO_RESET( RW ) \
{ \
int i; \
for ( i = 0; i < GPFSMPIO_CIO_LAST; i ++ ) \
gpfsmpio_prof_c##RW [ i ] = 0; \
int _i; \
for ( _i = 0; _i < GPFSMPIO_CIO_LAST; _i ++ ) \
gpfsmpio_prof_c##RW [ _i ] = 0; \
}
#define GPFSMPIO_T_CIO_REPORT( RW, FD, MYRANK, NPROCS ) \
......
......@@ -386,7 +386,7 @@ void ADIOI_GPFS_WriteStridedColl(ADIO_File fd, const void *buf, int count,
#endif
}
void gpfs_wr_access_start(int fd, ADIO_Offset offset, ADIO_Offset length)
static void gpfs_wr_access_start(int fd, ADIO_Offset offset, ADIO_Offset length)
{
int rc=0;
#ifdef HAVE_GPFS_FCNTL_H
......@@ -410,7 +410,7 @@ void gpfs_wr_access_start(int fd, ADIO_Offset offset, ADIO_Offset length)
ADIOI_Assert(rc == 0);
}
void gpfs_wr_access_end(int fd, ADIO_Offset offset, ADIO_Offset length)
static void gpfs_wr_access_end(int fd, ADIO_Offset offset, ADIO_Offset length)
{
int rc=0;
#ifdef HAVE_GPFS_FCNTL_H
......@@ -437,7 +437,7 @@ void gpfs_wr_access_end(int fd, ADIO_Offset offset, ADIO_Offset length)
#ifdef BGQPLATFORM
/* my_start, my_end: this processes file domain. coudd be -1,-1 for "no i/o"
* fd_start, fd_end: arrays of length fd->hints->cb_nodes specifying all file domains */
int gpfs_find_access_for_ion(ADIO_File fd,
static int gpfs_find_access_for_ion(ADIO_File fd,
ADIO_Offset my_start, ADIO_Offset my_end,
ADIO_Offset *fd_start, ADIO_Offset *fd_end,
ADIO_Offset *start, ADIO_Offset *end)
......@@ -987,7 +987,7 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, const void *buf, char *write_buf
if (nprocs_recv) {
if (*hole) {
char * stuff = "data-sieve-in-two-phase";
const char * stuff = "data-sieve-in-two-phase";
setenv("LIBIOLOG_EXTRA_INFO", stuff, 1);
ADIO_ReadContig(fd, write_buf, size, MPI_BYTE,
ADIO_EXPLICIT_OFFSET, off, &status, &err);
......
......@@ -494,7 +494,6 @@ ADIOI_BG_compute_agg_ranklist_serial ( ADIO_File fd,
int numbridges = 0;
int i;
for (i=0;i<naggs;i++)
bridgelistnum[i] = 0;
......@@ -580,7 +579,6 @@ ADIOI_BG_compute_agg_ranklist_serial ( ADIO_File fd,
while (ionlist[currentBridgeIndex] == currentIonId)
currentBridgeIndex++;
endSortIndex = currentBridgeIndex-1;
int x;
for (x=startSortIndex;x<=endSortIndex;x++) {
for (i=startSortIndex;i<endSortIndex;i++) {
if (bridgelist[i] > bridgelist[i+1]) {
......@@ -613,7 +611,6 @@ ADIOI_BG_compute_agg_ranklist_serial ( ADIO_File fd,
}
// sort thisBridgeAggList
int x;
for (x=0;x<numAggsForThisBridge;x++) {
int n;
for (n=0;n<(numAggsForThisBridge-1);n++) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment