Menu

#3346 osaf: build failed with gcc/​g++ 12

5.24.02
fixed
None
enhancement
unknown
-
5
major
False
2024-02-27
2024-01-12
No

Related

Wiki: ChangeLog-5.24.02
Wiki: NEWS-5.24.02

Discussion

  • Thang Duc Nguyen

    Build error on gcc/g++ 12

    src/osaf/consensus/key_value.cc: In static member function 'static int KeyValue::Execute(const std::string&, std::string&)':
    src/osaf/consensus/key_value.cc:25:30: error: aggregate 'std::array<char, 128> buffer' has incomplete type and cannot be defined
       25 |   std::array<char, buf_size> buffer;
    
    ./src/amf/amfd/node.h:169:19: error: 'template<class _Arg1, class _Arg2, class _Result> struct std::binary_function' is deprecated [-Werror=deprecated-declarations]
      169 |     : public std::binary_function<AVD_AVND *, AVD_AVND *, bool> {
          |                   ^~~~~~~~~~~~~~~
    
    src/dtm/dtmnd/dtm_node_db.cc: In function 'uint32_t dtm_node_delete(DTM_NODE_DB*, KeyTypes)':
    src/dtm/dtmnd/dtm_node_db.cc:295:25: error: the address of 'node_list::node_ip' will never be NULL [-Werror=address]
      295 |       if (node->node_ip != nullptr && node->pat_ip_address.key_info) {
          |           ~~~~~~~~~~~~~~^~~~~~~~~~
    In file included from ./src/dtm/dtmnd/dtm.h:25,
                     from src/dtm/dtmnd/dtm_node_db.cc:26:
    ./src/dtm/dtmnd/dtm_cb.h:49:8: note: 'node_list::node_ip' declared here
       49 |   char node_ip[INET6_ADDRSTRLEN];
    
    In function 'strncpy',
        inlined from 'immnd_forkPbe' at src/imm/immnd/immnd_proc.c:1904:2:
    /usr/include/bits/string_fortified.h:106:10: error: '__builtin_strncpy' destination unchanged after copying no bytes [-Werror=stringop-truncation]
      106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    src/smf/smfd/SmfProcedureThread.cc: In member function 'SaAisErrorT SmfProcedureThread::getImmProcedure(SmfUpgradeProcedure*)':
    src/smf/smfd/SmfProcedureThread.cc:461:12: error: '%s' directive argument is null [-Werror=format-overflow=]
      461 |     LOG_NO("SmfProcedureThread::getImmProcedure, Using own IMM handle %s",
    
     
  • Thang Duc Nguyen

    • status: unassigned --> assigned
    • assigned_to: Thang Duc Nguyen
     
  • Thang Duc Nguyen

    • status: assigned --> review
     
  • Thang Duc Nguyen

    • status: review --> fixed
     
  • Thang Duc Nguyen

    commit e01bbd5f649452acf4df8046fc8fcacd30bac792 (HEAD -> develop, origin/develop, ticket-3346)
    Author: thang.d.nguyen thang.d.nguyen@dektech.com.au
    Date: Mon Jan 15 14:41:56 2024 +0700

    osaf: supports compile/build with gcc/g++ 12 [#3346]
    
    Fix error when compiling/building Opensaf using
    gcc/g++ 12.
    
     
  • Gary Lee

    Gary Lee - 2024-02-27
    • Type: defect --> enhancement
     

Log in to post a comment.