From: W. Trevor King Date: Fri, 29 Oct 2010 15:48:28 +0000 (-0400) Subject: Use %lu to format the number of bytes in src/sorting/main.c. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2f428976c7fe04aa7483546291addeada1950b38;p=parallel_computing.git Use %lu to format the number of bytes in src/sorting/main.c. --- diff --git a/src/sorting/main.c b/src/sorting/main.c index 0bd6fd6..23a18b8 100644 --- a/src/sorting/main.c +++ b/src/sorting/main.c @@ -59,8 +59,8 @@ int read_data(const char *file_name, int *pList_size, double **pList) // allocate memory for the data *pList = (double *)malloc(sizeof(double) * *pList_size); if (*pList == NULL) { - fprintf(stderr, "could not allocate %d bytes\n", - sizeof(double) * *pList_size); + fprintf(stderr, "could not allocate %lu bytes\n", + (unsigned long int) (sizeof(double) * *pList_size)); return EXIT_FAILURE; } // read in the data