Use %lu to format the number of bytes in src/sorting/main.c.
authorW. Trevor King <wking@drexel.edu>
Fri, 29 Oct 2010 15:48:28 +0000 (11:48 -0400)
committerW. Trevor King <wking@drexel.edu>
Fri, 29 Oct 2010 15:48:28 +0000 (11:48 -0400)
src/sorting/main.c

index 0bd6fd6cb487ab0db439fc98ebad41f7ac6e390c..23a18b82385ecb371565c66fe8a8f2a162056384 100644 (file)
@@ -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