From 1554d510a5ff50dbab8e0226f6f2091b856e9160 Mon Sep 17 00:00:00 2001 From: Alexander Pletzer Date: Tue, 24 Jun 2025 10:47:44 +1200 Subject: [PATCH 1/2] fixed compiler error 267 | gradient_structure::get_fp()->fread(str,num_bytes); for gcc 14 --- src/seapodym_cohort.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/seapodym_cohort.cpp b/src/seapodym_cohort.cpp index 13c91d8..8783c53 100755 --- a/src/seapodym_cohort.cpp +++ b/src/seapodym_cohort.cpp @@ -264,7 +264,7 @@ void verify_identifier_string2(char* str1) //ASSUME str1 is not null long int num_bytes=strlen(str1); char* str = new char[num_bytes+1]; str[num_bytes]='\0'; - gradient_structure::get_fp()->fread(str,num_bytes); + gradient_structure().get_fp()->fread(str,num_bytes); if(strcmp(str1,str)) { cerr << "Error[" << __FILE__ << ':' << __LINE__ << "]: \"" << str << "\" != \"" << str1 << "\"\n"; @@ -289,7 +289,7 @@ string get_path(const char* parfile) int save_identifier_string2(char* str) { int length=strlen(str); - gradient_structure::get_fp()->fwrite(str,length); + gradient_structure().get_fp()->fwrite(str,length); return 0; } @@ -297,14 +297,14 @@ void save_long_int_value(unsigned long int x) { int num_bytes = sizeof(unsigned long int); void* y = (void*)&x; - gradient_structure::get_fp()->fwrite(y,num_bytes); + gradient_structure().get_fp()->fwrite(y,num_bytes); } unsigned long int restore_long_int_value(void) { void* tmpout; int num_bytes = sizeof(unsigned long int); - gradient_structure::get_fp()->fread(&tmpout,num_bytes); + gradient_structure().get_fp()->fread(&tmpout,num_bytes); return (unsigned long int)tmpout; } From 8602047c17f53183b9b04667325bcfae92e9604c Mon Sep 17 00:00:00 2001 From: Alexander Pletzer Date: Wed, 25 Jun 2025 09:02:57 +1200 Subject: [PATCH 2/2] the gradient_structure().get_fp()->fread(&tmpout,num_bytes); fix --- src/seapodym_density.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/seapodym_density.cpp b/src/seapodym_density.cpp index 8647b3f..b0444bf 100755 --- a/src/seapodym_density.cpp +++ b/src/seapodym_density.cpp @@ -264,7 +264,7 @@ void verify_identifier_string2(char* str1) //ASSUME str1 is not null long int num_bytes=strlen(str1); char* str = new char[num_bytes+1]; str[num_bytes]='\0'; - gradient_structure::get_fp()->fread(str,num_bytes); + gradient_structure().get_fp()->fread(str,num_bytes); if(strcmp(str1,str)) { cerr << "Error[" << __FILE__ << ':' << __LINE__ << "]: \"" << str << "\" != \"" << str1 << "\"\n"; @@ -289,7 +289,7 @@ string get_path(const char* parfile) int save_identifier_string2(char* str) { int length=strlen(str); - gradient_structure::get_fp()->fwrite(str,length); + gradient_structure().get_fp()->fwrite(str,length); return 0; } @@ -297,14 +297,14 @@ void save_long_int_value(unsigned long int x) { int num_bytes = sizeof(unsigned long int); void* y = (void*)&x; - gradient_structure::get_fp()->fwrite(y,num_bytes); + gradient_structure().get_fp()->fwrite(y,num_bytes); } unsigned long int restore_long_int_value(void) { void* tmpout; int num_bytes = sizeof(unsigned long int); - gradient_structure::get_fp()->fread(&tmpout,num_bytes); + gradient_structure().get_fp()->fread(&tmpout,num_bytes); return (unsigned long int)tmpout; }