neverchanje opened a new issue #642:
URL: https://github.com/apache/incubator-pegasus/issues/642


   Compilation failure of rdsn in origin/master.
   
   ## compiler
   
   gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
   
   ## error outputs
   
   ERROR#1
   
   ```
   /home/wutao1/git/pegasus/rdsn/include/dsn/utility/time_utils.h: In function 
‘void dsn::tools::print_header(FILE*, dsn_log_level_t)’:
   /home/wutao1/git/pegasus/rdsn/include/dsn/utility/time_utils.h:47:24: error: 
‘%02d’ directive writing between 2 and 11 bytes into a region of size between 0 
and 16 [-Werror=format-overflow=]
      47 |             "%04d-%02d-%02d %02d:%02d:%02d.%03u",
         |                        ^~~~
   /home/wutao1/git/pegasus/rdsn/include/dsn/utility/time_utils.h:47:13: note: 
directive argument in the range [0, 999]
      47 |             "%04d-%02d-%02d %02d:%02d:%02d.%03u",
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from /usr/include/stdio.h:867,
                    from /usr/include/c++/9/cstdio:42,
                    from /usr/include/c++/9/ext/string_conversions.h:43,
                    from /usr/include/c++/9/bits/basic_string.h:6493,
                    from /usr/include/c++/9/string:55,
                    from 
/home/wutao1/git/pegasus/rdsn/include/dsn/utility/ports.h:63,
                    from 
/home/wutao1/git/pegasus/rdsn/include/dsn/utility/synchronize.h:28,
                    from 
/home/wutao1/git/pegasus/rdsn/include/dsn/utility/singleton_store.h:39,
                    from 
/home/wutao1/git/pegasus/rdsn/include/dsn/utility/factory_store.h:38,
                    from 
/home/wutao1/git/pegasus/rdsn/include/dsn/tool_api.h:54,
                    from 
/home/wutao1/git/pegasus/rdsn/src/utils/simple_logger.h:29,
                    from 
/home/wutao1/git/pegasus/rdsn/src/utils/simple_logger.cpp:27:
   /usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: 
‘__builtin___sprintf_chk’ output between 24 and 76 bytes into a destination of 
size 24
      36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
         |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      37 |       __bos (__s), __fmt, __va_arg_pack ());
         |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ```
   
   ERROR#2
   
   ```
   /home/wutao1/git/pegasus/rdsn/src/runtime/rpc/rpc_message.cpp: In static 
member function ‘static dsn::message_ex* 
dsn::message_ex::copy_message_no_reply(const dsn::message_ex&)’:
   /home/wutao1/git/pegasus/rdsn/src/runtime/rpc/rpc_message.cpp:184:50: error: 
‘void* memset(void*, int, size_t)’ clearing an object of type 
‘dsn::message_header’ {aka ‘struct dsn::message_header’} with no trivial 
copy-assignment; use assignment or value-initialization instead 
[-Werror=class-memaccess]
     184 |     memset(msg->header, 0, sizeof(message_header));
         |                                                  ^
   In file included from 
/home/wutao1/git/pegasus/rdsn/src/runtime/rpc/rpc_message.cpp:39:
   /home/wutao1/git/pegasus/rdsn/include/dsn/tool-api/rpc_message.h:79:16: 
note: ‘dsn::message_header’ {aka ‘struct dsn::message_header’} declared here
      79 | typedef struct message_header
         |                ^~~~~~~~~~~~~~
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to