i=Brian Murrell
getopt returns int, at the same time "char" type can have the same range as "unsigned char" type and, thus, unable to hold -1 rc from getopt
int main(int argc, char *argv[])
{
- int i, iterations = 16;
- char c;
+ int i, iterations = 16, c;
long stride = -1;
unsigned int seed = 0;
static void
process_args(int argc, char *argv[])
{
- char c, *cp, *endptr;
- int i, index, offset, tmpend, rc;
+ char *cp, *endptr;
+ int i, index, offset, tmpend, rc, c;
char tmp[16];
FILE * seed_file;
struct option *opt;
#define CHUNK_SIZE(n) chunk_size[(n) % 2]
int main (int argc, char *argv[]) {
- int i, n, fd;
+ int i, n, fd, c;
unsigned long chunk_size[2];
int rank, noProcessors, done;
int error;
off_t offset;
char **chunk_buf;
- char *read_buf, c;
+ char *read_buf;
struct stat stat_buf;
ssize_t ret;
char *filename = "/mnt/lustre/write_disjoint";