[AGENT++] why is std::list, std::array, or std::queue not used?

Claus Klein claus.klein at arcormail.de
Sat Aug 25 17:56:33 CEST 2018


I had a dream of portable, readable, clean code without #ifdef
using nothing else than -std=c++14 and boost as a wrapper for older c++03 compilers.

Best regards
Claus

/usr/local/include/agent_pp/List.h:945:0: warning: Either the condition 'if(h)' is redundant or there is possible null pointer dereference: h. [nullPointerRedundantCheck]
        memcpy(content + 1, h, sz * sizeof(T*));
^
/usr/local/include/agent_pp/List.h:947:0: note: Assuming that condition 'if(h)' is not redundant
        if (h) {
^
/usr/local/include/agent_pp/List.h:945:0: note: Null pointer dereference
        memcpy(content + 1, h, sz * sizeof(T*));
^
/usr/local/include/agent_pp/List.h:966:0: warning: Either the condition 'if(h)' is redundant or there is possible null pointer dereference: h. [nullPointerRedundantCheck]
        memcpy(content, h, sz * sizeof(T*));
^
/usr/local/include/agent_pp/List.h:968:0: note: Assuming that condition 'if(h)' is not redundant
        if (h) {
^
/usr/local/include/agent_pp/List.h:966:0: note: Null pointer dereference
        memcpy(content, h, sz * sizeof(T*));
^
/usr/local/include/agent_pp/List.h:1002:0: warning: Either the condition 'if(h)' is redundant or there is possible null pointer dereference: h. [nullPointerRedundantCheck]
                memcpy(content, h, i * sizeof(T*));
^
/usr/local/include/agent_pp/List.h:1005:0: note: Assuming that condition 'if(h)' is not redundant
                if (h) {
^
/usr/local/include/agent_pp/List.h:1002:0: note: Null pointer dereference
                memcpy(content, h, i * sizeof(T*));
^
/usr/local/include/agent_pp/List.h:1003:0: warning: Either the condition 'if(h)' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck]
                memcpy(content + i + 1, h + i, (sz - i) * sizeof(T*));
^
/usr/local/include/agent_pp/List.h:1005:0: note: Assuming that condition 'if(h)' is not redundant
                if (h) {
^
/usr/local/include/agent_pp/List.h:1003:0: note: Null pointer addition
                memcpy(content + i + 1, h + i, (sz - i) * sizeof(T*));
^
/usr/local/include/agent_pp/List.h:1061:0: warning: Either the condition 'if(h)' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck]
        memcpy(content, h + 1, sz * sizeof(T*));
^
/usr/local/include/agent_pp/List.h:1062:0: note: Assuming that condition 'if(h)' is not redundant
        if (h) {
^
/usr/local/include/agent_pp/List.h:1061:0: note: Null pointer addition
        memcpy(content, h + 1, sz * sizeof(T*));
^



More information about the AGENTPP mailing list