X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/43ac308ea20014761481bc40525496a0bb1d9740..b27841d687ec9e84983340b5581376dfb24010ea:/projects/stargazer/plugins/other/smux/utils.cpp diff --git a/projects/stargazer/plugins/other/smux/utils.cpp b/projects/stargazer/plugins/other/smux/utils.cpp index 0ea39bbb..a2c1a47f 100644 --- a/projects/stargazer/plugins/other/smux/utils.cpp +++ b/projects/stargazer/plugins/other/smux/utils.cpp @@ -1,18 +1,21 @@ -#include // write - -#include // memset -#include +#include "utils.h" +#include "pen.h" #include "stg/common.h" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wold-style-cast" #include "stg/OpenPDU.h" #include "stg/ClosePDU.h" #include "stg/RReqPDU.h" #include "stg/ber_decoder.h" #include "stg/der_encoder.h" +#pragma GCC diagnostic pop -#include "pen.h" -#include "utils.h" +#include // memset +#include + +#include // write bool String2OI(const std::string & str, OBJECT_IDENTIFIER_t * oi) { @@ -168,12 +171,13 @@ size_t length = read(fd, buffer, sizeof(buffer)); if (length < 1) return NULL; asn_dec_rval_t error; -error = ber_decode(0, &asn_DEF_SMUX_PDUs, (void **)&pdus, buffer, length); +void* p = pdus; +error = ber_decode(0, &asn_DEF_SMUX_PDUs, &p, buffer, length); if(error.code != RC_OK) { printfd(__FILE__, "Failed to decode PDUs at byte %ld\n", - (long)error.consumed); + static_cast(error.consumed)); return NULL; } return pdus;