Skip to content
Snippets Groups Projects
Commit b89d15ca authored by Izzard, Robert Dr (Maths & Physics)'s avatar Izzard, Robert Dr (Maths & Physics)
Browse files

fix further issues with casting of size_t by forcing various lengths to

be of type size_t
parent 2377d51e
No related branches found
No related tags found
No related merge requests found
...@@ -746,7 +746,7 @@ void Print_trace(void); ...@@ -746,7 +746,7 @@ void Print_trace(void);
* Note : all strings stored in stardata->preferneces should be of length * Note : all strings stored in stardata->preferneces should be of length
* STRING_LENGTH (if they are set by command-line options). * STRING_LENGTH (if they are set by command-line options).
*/ */
#define STRING_LENGTH 4096 #define STRING_LENGTH ((size_t)4096)
#define BATCHMODE_STRING_LENGTH STRING_LENGTH #define BATCHMODE_STRING_LENGTH STRING_LENGTH
/* /*
...@@ -756,7 +756,7 @@ void Print_trace(void); ...@@ -756,7 +756,7 @@ void Print_trace(void);
* At the time of writing, this requires just over 100KByte of RAM, * At the time of writing, this requires just over 100KByte of RAM,
* so I have set the length to 250KByte. * so I have set the length to 250KByte.
*/ */
#define MAX_BUFFERED_STRING_LENGTH (1024*250) #define MAX_BUFFERED_STRING_LENGTH ((size_t)(1024*250))
/* /*
* Buffer increase ratio: this is the amount * Buffer increase ratio: this is the amount
...@@ -778,8 +778,8 @@ void Print_trace(void); ...@@ -778,8 +778,8 @@ void Print_trace(void);
* to allow error strings to be printed even when the * to allow error strings to be printed even when the
* buffer is full. * buffer is full.
*/ */
#define BUFFERED_PRINTF_MAX_BUFFER_SIZE (1024*1024*250) #define BUFFERED_PRINTF_MAX_BUFFER_SIZE ((size_t)(1024*1024*250))
#define BUFFERED_PRINTF_ERROR_BUFFER_SIZE (1024) #define BUFFERED_PRINTF_ERROR_BUFFER_SIZE ((size_t)(1024))
/* /*
* Enable BUFFER_MEMORY_DEBUGGING to output * Enable BUFFER_MEMORY_DEBUGGING to output
...@@ -864,7 +864,7 @@ void Print_trace(void); ...@@ -864,7 +864,7 @@ void Print_trace(void);
"Unknown" \ "Unknown" \
) )
#define GSL_INTEGRATOR_WORKSPACE_SIZE 1000 #define GSL_INTEGRATOR_WORKSPACE_SIZE ((size_t)1000)
#define GSL_INTEGRATOR_QAG 1 #define GSL_INTEGRATOR_QAG 1
#define GSL_INTEGRATOR_QNG 2 #define GSL_INTEGRATOR_QNG 2
#define GSL_INTEGRATOR_QAGS 3 #define GSL_INTEGRATOR_QAGS 3
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
#define BIGLOG_LINES (BIGLOG_SIZE/MEMMAP_STRING_LENGTH) #define BIGLOG_LINES (BIGLOG_SIZE/MEMMAP_STRING_LENGTH)
/* Note that MEMMAP_STRING_LENGTH must be <= STRING_LENGTH */ /* Note that MEMMAP_STRING_LENGTH must be <= STRING_LENGTH */
#define MEMMAP_STRING_LENGTH 82 #define MEMMAP_STRING_LENGTH ((size_t)82)
#endif /* MEMMAP */ #endif /* MEMMAP */
#define HRDIAG_FILENAME "/tmp/c_binary_hrdiag.dat" #define HRDIAG_FILENAME "/tmp/c_binary_hrdiag.dat"
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#define STELLAR_COLOUR_STRINGS {"U","B","V","R","I","J","H","K","u","g","r","i","z","f300w","f336w","f435w","f450w","f555w","f606w","f814w","G","GBP","GRP","GRVS"} #define STELLAR_COLOUR_STRINGS {"U","B","V","R","I","J","H","K","u","g","r","i","z","f300w","f336w","f435w","f450w","f555w","f606w","f814w","G","GBP","GRP","GRVS"}
#define STELLAR_COLOUR_STRING_LENGTH 6 #define STELLAR_COLOUR_STRING_LENGTH ((size_t)6)
#define NUMBER_OF_STELLAR_MAGNITUDES 24 #define NUMBER_OF_STELLAR_MAGNITUDES 24
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#define NUM_SN_TYPES 21 #define NUM_SN_TYPES 21
#define NUM_SN_STRINGS NUM_SN_TYPES #define NUM_SN_STRINGS NUM_SN_TYPES
#define SN_STRING_LENGTH 30 #define SN_STRING_LENGTH ((size_t)30)
#define SN_STRINGS { \ #define SN_STRINGS { \
"None",/*0*/ \ "None",/*0*/ \
"HeIa", \ "HeIa", \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment