diff --git a/deploy/os/ubuntu22.opts b/deploy/os/ubuntu22.opts new file mode 100644 index 0000000000..33f03af7cc --- /dev/null +++ b/deploy/os/ubuntu22.opts @@ -0,0 +1 @@ +--platform=debian --valgrind=memcheck,helgrind --dockerimage=mdsplus/builder:ubuntu22-64 --distname=Ubuntu22 --arch=amd64 diff --git a/deploy/packaging/linux.xml b/deploy/packaging/linux.xml index 3a0aa5f6a8..0bbd0f5637 100644 --- a/deploy/packaging/linux.xml +++ b/deploy/packaging/linux.xml @@ -822,6 +822,13 @@ rm -f /etc/ld.so.conf.d/mdsplus.conf 2>/dev/null + + + + + + + diff --git a/mdsobjects/cpp/mdsipobjects.cpp b/mdsobjects/cpp/mdsipobjects.cpp index e5b86642b8..450052b8a7 100644 --- a/mdsobjects/cpp/mdsipobjects.cpp +++ b/mdsobjects/cpp/mdsipobjects.cpp @@ -45,8 +45,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. using namespace MDSplus; using namespace std; -extern "C" void *getManyObj(char *serializedIn) throw(MdsException); -extern "C" void *putManyObj(char *serializedIn) throw(MdsException); +extern "C" void *getManyObj(char *serializedIn); +extern "C" void *putManyObj(char *serializedIn); extern "C" void *compileFromExprWithArgs(char *expr, int nArgs, void *args, void *tree); extern "C" int SendArg(int sock, unsigned char idx, char dtype, @@ -108,7 +108,7 @@ static int convertType(int mdsType) } } -void *getManyObj(char *serializedIn) throw(MdsException) +void *getManyObj(char *serializedIn) { AutoData inArgs((List *)deserialize((const char *)serializedIn)); if (inArgs->clazz != CLASS_APD) // || inArgs->dtype != DTYPE_LIST) @@ -241,7 +241,7 @@ void *getManyObj(char *serializedIn) throw(MdsException) return result->convertToDsc(); } -void *putManyObj(char *serializedIn) throw(MdsException) +void *putManyObj(char *serializedIn) { AutoData inArgs((List *)deserialize((const char *)serializedIn)); if (inArgs->clazz != CLASS_APD) // || inArgs->dtype != DTYPE_LIST) diff --git a/mdstcpip/udt4/src/core.cpp b/mdstcpip/udt4/src/core.cpp index 2e77afb8ae..de0e92f313 100644 --- a/mdstcpip/udt4/src/core.cpp +++ b/mdstcpip/udt4/src/core.cpp @@ -688,7 +688,7 @@ void CUDT::connect(const sockaddr *serv_addr) { } #pragma GCC diagnostic pop -int CUDT::connect(const CPacket &response) throw() { +int CUDT::connect(const CPacket &response) { // this is the 2nd half of a connection request. If the connection is setup // successfully this returns 0. returning -1 means there is an error. // returning 1 or 2 means the connection is in process and needs more diff --git a/mdstcpip/udt4/src/core.h b/mdstcpip/udt4/src/core.h index fde764cdc6..af6a35e031 100644 --- a/mdstcpip/udt4/src/core.h +++ b/mdstcpip/udt4/src/core.h @@ -159,7 +159,7 @@ class CUDT { // Return 0 if connected, positive value if connection is in progress, // otherwise error code. - int connect(const CPacket &pkt) throw(); + int connect(const CPacket &pkt); // Functionality: // Connect to a UDT entity listening at address "peer", which has sent "hs" diff --git a/tdishr/TdiXxx.c b/tdishr/TdiXxx.c index d64db4cfbd..cbdd091e37 100644 --- a/tdishr/TdiXxx.c +++ b/tdishr/TdiXxx.c @@ -133,9 +133,9 @@ static void divide(struct descriptor_xd *left_ptr, Unsigned integers are absolute. */ int Tdi2Abs(int narg __attribute__((unused)), - struct descriptor_xd uni[1] __attribute__((unused)), - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], + struct descriptor_xd * uni __attribute__((unused)), + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -150,9 +150,9 @@ int Tdi2Abs(int narg __attribute__((unused)), Category is "or" of inputs setting length and type. Example: f-complex with h-real makes h-complex. */ -int Tdi2Add(int narg __attribute__((unused)), struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Add(int narg __attribute__((unused)), struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -167,9 +167,9 @@ int Tdi2Add(int narg __attribute__((unused)), struct descriptor_xd uni[1], Category is "or" of inputs setting length and type. Example: f-complex with h-real makes h-complex. */ -int Tdi2Atan2(int narg __attribute__((unused)), struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Atan2(int narg __attribute__((unused)), struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -184,9 +184,9 @@ int Tdi2Atan2(int narg __attribute__((unused)), struct descriptor_xd uni[1], DIGITS DSIZE RANGE PRECISION ESIZE LEN LEN_TRIM MAX_EXPONENT MIN_EXPONENT RADIX RANK SIZE_OF SORT? */ -int Tdi2Any(int narg __attribute__((unused)), struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1] __attribute__((unused)), +int Tdi2Any(int narg __attribute__((unused)), struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats __attribute__((unused)), int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -199,9 +199,9 @@ int Tdi2Any(int narg __attribute__((unused)), struct descriptor_xd uni[1], /*--------------------------------------------------- Fix categories for opcodes: ADJUSTL ADJUSTR TRANSLATE UPCASE. */ -int Tdi2Adjust(int narg, struct descriptor_xd uni[1] __attribute__((unused)), - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Adjust(int narg, struct descriptor_xd * uni __attribute__((unused)), + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -214,8 +214,8 @@ int Tdi2Adjust(int narg, struct descriptor_xd uni[1] __attribute__((unused)), Fix categories for opcodes: AINT ANINT CEILING FLOOR NINT. Second argument is KIND. */ -int Tdi2Aint(int narg, struct descriptor_xd uni[1] __attribute__((unused)), - struct descriptor_xd dat[1], struct TdiCatStruct cats[1], +int Tdi2Aint(int narg, struct descriptor_xd * uni __attribute__((unused)), + struct descriptor_xd * dat, struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -247,9 +247,9 @@ int Tdi2Aint(int narg, struct descriptor_xd uni[1] __attribute__((unused)), /*--------------------------------------------------- Fix categories for opcodes: BSEARCH, IS_IN. */ -int Tdi2Bsearch(int narg __attribute__((unused)), struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Bsearch(int narg __attribute__((unused)), struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) @@ -267,9 +267,9 @@ int Tdi2Bsearch(int narg __attribute__((unused)), struct descriptor_xd uni[1], /*--------------------------------------------------- Fix categories for opcodes, out=logical in1=any, in2..=long: BTEST */ -int Tdi2Btest(int narg, struct descriptor_xd uni[1] __attribute__((unused)), - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Btest(int narg, struct descriptor_xd * uni __attribute__((unused)), + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -286,8 +286,8 @@ int Tdi2Btest(int narg, struct descriptor_xd uni[1] __attribute__((unused)), /*--------------------------------------------------- Fix categories for opcodes ACHAR and CHAR, length 1 text. */ -int Tdi2Char(int narg, struct descriptor_xd uni[1] __attribute__((unused)), - struct descriptor_xd dat[1], struct TdiCatStruct cats[1], +int Tdi2Char(int narg, struct descriptor_xd * uni __attribute__((unused)), + struct descriptor_xd * dat, struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -321,8 +321,8 @@ int Tdi2Char(int narg, struct descriptor_xd uni[1] __attribute__((unused)), Array shapes must match if more than one array. Data type is set by mold, else by larger. */ -int Tdi2Cmplx(int narg, struct descriptor_xd uni[1], - struct descriptor_xd dat[1], struct TdiCatStruct cats[1], +int Tdi2Cmplx(int narg, struct descriptor_xd * uni, + struct descriptor_xd * dat, struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -395,9 +395,9 @@ int Tdi2Cmplx(int narg, struct descriptor_xd uni[1], /*--------------------------------------------------- Fix categories for opcode: CONCAT text concatenation. */ -int Tdi2Concat(int narg __attribute__((unused)), struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Concat(int narg __attribute__((unused)), struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -412,9 +412,9 @@ int Tdi2Concat(int narg __attribute__((unused)), struct descriptor_xd uni[1], out = CVT(input, example) converts input to dtype of example. */ int Tdi2Cvt(int narg __attribute__((unused)), - struct descriptor_xd uni[1] __attribute__((unused)), - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], + struct descriptor_xd * uni __attribute__((unused)), + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -428,9 +428,9 @@ int Tdi2Cvt(int narg __attribute__((unused)), /*--------------------------------------------------- Fix categories for opcode: DBLE. */ -int Tdi2Dble(int narg, struct descriptor_xd uni[1] __attribute__((unused)), - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Dble(int narg, struct descriptor_xd * uni __attribute__((unused)), + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -444,9 +444,9 @@ int Tdi2Dble(int narg, struct descriptor_xd uni[1] __attribute__((unused)), /*--------------------------------------------------- Fix categories for opcode: DIVIDE */ -int Tdi2Divide(int narg __attribute__((unused)), struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Divide(int narg __attribute__((unused)), struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -459,9 +459,9 @@ int Tdi2Divide(int narg __attribute__((unused)), struct descriptor_xd uni[1], /*--------------------------------------------------- Fix categories for opcode: DPROD. */ -int Tdi2Dprod(int narg, struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Dprod(int narg, struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -479,9 +479,9 @@ int Tdi2Dprod(int narg, struct descriptor_xd uni[1], Output category is logical. Example: f-complex with h-real makes h-complex. */ -int Tdi2Eq(int narg __attribute__((unused)), struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Eq(int narg __attribute__((unused)), struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -495,9 +495,9 @@ int Tdi2Eq(int narg __attribute__((unused)), struct descriptor_xd uni[1], /*--------------------------------------------------- Fix categories for opcode: ELEMENT(number, delimiter, source) */ -int Tdi2Element(int narg, struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Element(int narg, struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) @@ -514,8 +514,8 @@ int Tdi2Element(int narg, struct descriptor_xd uni[1], /*--------------------------------------------------- Fix categories for opcode: EXTRACT(start, length, source) */ -int Tdi2Extract(int narg, struct descriptor_xd uni[1], - struct descriptor_xd dat[1], struct TdiCatStruct cats[1], +int Tdi2Extract(int narg, struct descriptor_xd * uni, + struct descriptor_xd * dat, struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) @@ -541,9 +541,9 @@ int Tdi2Extract(int narg, struct descriptor_xd uni[1], Data type is set by highest, but complexity is kept. Complexity of output is set by first argument. */ -int Tdi2Fix(int narg, struct descriptor_xd uni[1] __attribute__((unused)), - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Fix(int narg, struct descriptor_xd * uni __attribute__((unused)), + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -562,9 +562,9 @@ int Tdi2Fix(int narg, struct descriptor_xd uni[1] __attribute__((unused)), /*--------------------------------------------------- Fix categories for opcode: IAND, IAND_NOT, IEOR, etc. */ -int Tdi2Iand(int narg, struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Iand(int narg, struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -581,9 +581,9 @@ int Tdi2Iand(int narg, struct descriptor_xd uni[1], /*--------------------------------------------------- Fix categories for opcode: INVERSE */ -int Tdi2Inverse(int narg __attribute__((unused)), struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1] __attribute__((unused)), +int Tdi2Inverse(int narg __attribute__((unused)), struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats __attribute__((unused)), int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) @@ -605,9 +605,9 @@ int Tdi2Inverse(int narg __attribute__((unused)), struct descriptor_xd uni[1], OCTAWORD_UNSIGNED INT_UNSIGNED UNSIGNED D_FLOAT F_FLOAT G_FLOAT H_FLOAT */ int Tdi2Keep(int narg __attribute__((unused)), - struct descriptor_xd uni[1] __attribute__((unused)), - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1] __attribute__((unused)), + struct descriptor_xd * uni __attribute__((unused)), + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats __attribute__((unused)), int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -617,9 +617,9 @@ int Tdi2Keep(int narg __attribute__((unused)), /*--------------------------------------------------- Fix categories for logical opcodes: AND, AND_NOT, EQV etc. */ -int Tdi2Land(int narg __attribute__((unused)), struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Land(int narg __attribute__((unused)), struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -642,9 +642,9 @@ int Tdi2Land(int narg __attribute__((unused)), struct descriptor_xd uni[1], Fix categories for opcodes, out=in1, in2..=long: IBCLR IBITS IBSET MEDIAN SCALE SET_EXPONENT SMOOTH. */ -int Tdi2Long2(int narg, struct descriptor_xd uni[1] __attribute__((unused)), - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Long2(int narg, struct descriptor_xd * uni __attribute__((unused)), + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -664,9 +664,9 @@ int Tdi2Long2(int narg, struct descriptor_xd uni[1] __attribute__((unused)), Fix categories for opcodes, in1=any logical, in2=long-scalar out=logical: ALL ANY COUNT FIRSTLOC LASTLOC. */ -int Tdi2Mask1(int narg __attribute__((unused)), struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Mask1(int narg __attribute__((unused)), struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -685,9 +685,9 @@ int Tdi2Mask1(int narg __attribute__((unused)), struct descriptor_xd uni[1], Fix categories for opcodes, out=in1, in2..=any logical: MAXLOC MINLOC. */ -int Tdi2Mask2(int narg, struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Mask2(int narg, struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -710,9 +710,9 @@ int Tdi2Mask2(int narg, struct descriptor_xd uni[1], Fix categories for opcodes, out=in1=any numeric, in2=long-scalar in3=any logical: MAXVAL MEAN MINVAL RMS STD_DEV SUM. NEED code for PRODUCT. */ -int Tdi2Mask3(int narg, struct descriptor_xd uni[1] __attribute__((unused)), - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Mask3(int narg, struct descriptor_xd * uni __attribute__((unused)), + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -736,9 +736,9 @@ int Tdi2Mask3(int narg, struct descriptor_xd uni[1] __attribute__((unused)), Fix categories for opcodes, out=long-scalar, in1=any numeric, in2=long-scalar in3=any logical: MAXLOC MINLOC. */ -int Tdi2Mask3L(int narg, struct descriptor_xd uni[1] __attribute__((unused)), - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Mask3L(int narg, struct descriptor_xd * uni __attribute__((unused)), + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -763,9 +763,9 @@ int Tdi2Mask3L(int narg, struct descriptor_xd uni[1] __attribute__((unused)), Fix categories for opcodes with input, same, logical: any = MERGE(x,y,b). */ -int Tdi2Merge(int narg, struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Merge(int narg, struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -788,9 +788,9 @@ int Tdi2Merge(int narg, struct descriptor_xd uni[1], /*--------------------------------------------------- Fix categories for opcode: MULTIPLY */ -int Tdi2Multiply(int narg __attribute__((unused)), struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Multiply(int narg __attribute__((unused)), struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) @@ -805,9 +805,9 @@ int Tdi2Multiply(int narg __attribute__((unused)), struct descriptor_xd uni[1], Fix categories for opcodes for most 1-argument function that should not have units. */ -int Tdi2None(int narg __attribute__((unused)), struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1] __attribute__((unused)), +int Tdi2None(int narg __attribute__((unused)), struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats __attribute__((unused)), int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -823,9 +823,9 @@ int Tdi2None(int narg __attribute__((unused)), struct descriptor_xd uni[1], /*--------------------------------------------------- Fix categories for opcodes with logical result: NOT LOGICAL */ -int Tdi2Not(int narg __attribute__((unused)), struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Not(int narg __attribute__((unused)), struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -847,9 +847,9 @@ int Tdi2Not(int narg __attribute__((unused)), struct descriptor_xd uni[1], Fix categories for opcode without H-complex: COS, EXP, LOG, SIN, SQRT. We choose to convert to G-complex. */ -int Tdi2NoHc(int narg, struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2NoHc(int narg, struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -871,9 +871,9 @@ int Tdi2NoHc(int narg, struct descriptor_xd uni[1], /*--------------------------------------------------- Fix categories for opcode: PACK in1 matches in3 if any, in2 = logical. */ -int Tdi2Pack(int narg, struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Pack(int narg, struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -901,9 +901,9 @@ int Tdi2Pack(int narg, struct descriptor_xd uni[1], /*--------------------------------------------------- Fix categories for opcode: POWER. */ -int Tdi2Power(int narg __attribute__((unused)), struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Power(int narg __attribute__((unused)), struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -940,9 +940,9 @@ int Tdi2Power(int narg __attribute__((unused)), struct descriptor_xd uni[1], Fix categories for opcode: DTYPE_RANGE, also used in I_TO_X and CULL/EXTEND. */ -int Tdi2Range(int narg, struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Range(int narg, struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -966,8 +966,8 @@ int Tdi2Range(int narg, struct descriptor_xd uni[1], Fix categories for opcodes: FLOAT INT REAL. This expects arguments (x,[kind]) */ -int Tdi2Real(int narg, struct descriptor_xd uni[1] __attribute__((unused)), - struct descriptor_xd dat[1], struct TdiCatStruct cats[1], +int Tdi2Real(int narg, struct descriptor_xd * uni __attribute__((unused)), + struct descriptor_xd * dat, struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -997,8 +997,8 @@ int Tdi2Real(int narg, struct descriptor_xd uni[1] __attribute__((unused)), /*--------------------------------------------------- Fix categories for opcode: REPEAT text duplication. */ -int Tdi2Repeat(int narg, struct descriptor_xd uni[1] __attribute__((unused)), - struct descriptor_xd dat[1], struct TdiCatStruct cats[1], +int Tdi2Repeat(int narg, struct descriptor_xd * uni __attribute__((unused)), + struct descriptor_xd * dat, struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -1020,9 +1020,9 @@ int Tdi2Repeat(int narg, struct descriptor_xd uni[1] __attribute__((unused)), Fix categories for opcodes, output = first: SHFT SHIFT_LEFT SHIFT_RIGHT. */ -int Tdi2Shft(int narg, struct descriptor_xd uni[1] __attribute__((unused)), - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Shft(int narg, struct descriptor_xd * uni __attribute__((unused)), + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -1037,9 +1037,9 @@ int Tdi2Shft(int narg, struct descriptor_xd uni[1] __attribute__((unused)), /*--------------------------------------------------- Fix categories for opcode: SIGN NEAREST. */ -int Tdi2Sign(int narg, struct descriptor_xd uni[1] __attribute__((unused)), - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Sign(int narg, struct descriptor_xd * uni __attribute__((unused)), + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -1051,9 +1051,9 @@ int Tdi2Sign(int narg, struct descriptor_xd uni[1] __attribute__((unused)), /*--------------------------------------------------- Fix categories for opcodes: ABSSQ SQUARE. */ -int Tdi2Square(int narg __attribute__((unused)), struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1] __attribute__((unused)), +int Tdi2Square(int narg __attribute__((unused)), struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats __attribute__((unused)), int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -1069,8 +1069,8 @@ int Tdi2Square(int narg __attribute__((unused)), struct descriptor_xd uni[1], /*--------------------------------------------------- Fix categories for opcode: STRING text length specifier. */ -int Tdi2String(int narg, struct descriptor_xd uni[1] __attribute__((unused)), - struct descriptor_xd dat[1], struct TdiCatStruct cats[1], +int Tdi2String(int narg, struct descriptor_xd * uni __attribute__((unused)), + struct descriptor_xd * dat, struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -1093,8 +1093,8 @@ int Tdi2String(int narg, struct descriptor_xd uni[1] __attribute__((unused)), /*--------------------------------------------------- Fix categories for opcode: TEXT text length specifier. */ -int Tdi2Text(int narg, struct descriptor_xd uni[1] __attribute__((unused)), - struct descriptor_xd dat[1], struct TdiCatStruct cats[1], +int Tdi2Text(int narg, struct descriptor_xd * uni __attribute__((unused)), + struct descriptor_xd * dat, struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -1118,9 +1118,9 @@ int Tdi2Text(int narg, struct descriptor_xd uni[1] __attribute__((unused)), Fix categories for opcodes with text, text, logical: integer = INDEX(t,t,[b]), SCAN(t,t,[b]), VERIFY(t,t,[b]). */ -int Tdi2Ttb(int narg, struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1], +int Tdi2Ttb(int narg, struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats, int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { @@ -1135,9 +1135,9 @@ int Tdi2Ttb(int narg, struct descriptor_xd uni[1], /*--------------------------------------------------- Fix units for VECTOR, they must match or be missing. */ -int Tdi2Vector(int narg, struct descriptor_xd uni[1], - struct descriptor_xd dat[1] __attribute__((unused)), - struct TdiCatStruct cats[1] __attribute__((unused)), +int Tdi2Vector(int narg, struct descriptor_xd * uni, + struct descriptor_xd * dat __attribute__((unused)), + struct TdiCatStruct * cats __attribute__((unused)), int (**routine_ptr)() __attribute__((unused)), int o1 __attribute__((unused)), int o2 __attribute__((unused))) { diff --git a/xtreeshr/XTreeDefaultSquish.c b/xtreeshr/XTreeDefaultSquish.c index 9c1b1c43b5..8920fd5a4c 100644 --- a/xtreeshr/XTreeDefaultSquish.c +++ b/xtreeshr/XTreeDefaultSquish.c @@ -254,8 +254,10 @@ static inline int mergeArrays(struct descriptor_a *signalsApd, (struct descriptor_xd *)malloc(numSignals * sizeof(struct descriptor_xd)); for (i = 0; i < numSignals; i++) (*dimensionsXd)[i] = emptyXd; - arraysD = (struct descriptor_a **)(*arraysBuf = - malloc(numSignals * sizeof(char *))); + size_t arraysDsize = numSignals * sizeof(char *); + *arraysBuf = malloc(arraysDsize); + arraysD = (struct descriptor_a **)(*arraysBuf); + memset(arraysD, 0, arraysDsize); // Evaluate first dimension for all segments int totSize = 0; for (i = 0; i < numSignals; i++)