diff options
| author | yangwei <[email protected]> | 2023-07-28 23:40:07 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2023-08-02 18:22:12 +0800 |
| commit | 44f4cabef1fd40969e6b874c8d99d0acdf79895a (patch) | |
| tree | a91fc1a4217b7727a13af1e6095e3d73b1b2314d /src/sapp_dev | |
| parent | 840c58a1efeed8f5cb7959ac7a110bbf3c2421e7 (diff) | |
🐞 fix(cmd args mem free): 修复-c参数申请的内存,退出时未释放的bug
Diffstat (limited to 'src/sapp_dev')
| -rw-r--r-- | src/sapp_dev/sapp_global_val.c | 8 | ||||
| -rw-r--r-- | src/sapp_dev/sapp_init.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/sapp_dev/sapp_global_val.c b/src/sapp_dev/sapp_global_val.c index cf90ee9..164c255 100644 --- a/src/sapp_dev/sapp_global_val.c +++ b/src/sapp_dev/sapp_global_val.c @@ -189,25 +189,25 @@ void sapp_global_val_sanity_check(void) { /* ���߳�ȫ�ֱ���size������64�ֽ�������, ������cache�����ͻ, ����Ӱ������ */ if((sizeof(struct sapp_global_mthread_t) % 64) != 0){ - printf("\033[1;31;40msizeof(struct sapp_global_mthread_t)=%u, is not multiple of 64B!\033[0m\n", sizeof(struct sapp_global_mthread_t)); + printf("\033[1;31;40msizeof(struct sapp_global_mthread_t)=%zu, is not multiple of 64B!\033[0m\n", sizeof(struct sapp_global_mthread_t)); printf("\033[1;31;40mYou must add %d bytes padding to sapp_global_mthread_t!\033[0m\n", mem_alignment_pad(sizeof(struct sapp_global_mthread_t))); abort(); } if((sizeof(sapp_gval_mthread_t) % 64) != 0){ - printf("\033[1;31;40msizeof(sapp_gval_mthread_t)=%u, is not multiple of 64B!\033[0m\n", sizeof(sapp_gval_mthread_t)); + printf("\033[1;31;40msizeof(sapp_gval_mthread_t)=%zu, is not multiple of 64B!\033[0m\n", sizeof(sapp_gval_mthread_t)); printf("\033[1;31;40mYou must add %d bytes padding to sapp_gval_mthread_t!\033[0m\n", mem_alignment_pad(sizeof(sapp_gval_mthread_t))); abort(); } if((sizeof(sapp_gval_individual_volatile_t) % 64) != 0){ - printf("\033[1;31;40msizeof(sapp_gval_individual_volatile_t)=%u, is not multiple of 64B!\033[0m\n", sizeof(sapp_gval_individual_volatile_t)); + printf("\033[1;31;40msizeof(sapp_gval_individual_volatile_t)=%zu, is not multiple of 64B!\033[0m\n", sizeof(sapp_gval_individual_volatile_t)); printf("\033[1;31;40mYou must add %d bytes padding to sapp_gval_individual_volatile_t!\033[0m\n", mem_alignment_pad(sizeof(sapp_gval_individual_volatile_t))); abort(); } if((sizeof(layer_args_t) % 64) != 0){ - printf("\033[1;31;40msizeof(struct layer_args_t)=%u, is not multiple of 64B!\033[0m\n", sizeof(layer_args_t)); + printf("\033[1;31;40msizeof(struct layer_args_t)=%zu, is not multiple of 64B!\033[0m\n", sizeof(layer_args_t)); abort(); } diff --git a/src/sapp_dev/sapp_init.c b/src/sapp_dev/sapp_init.c index 016f7c7..c44a50d 100644 --- a/src/sapp_dev/sapp_init.c +++ b/src/sapp_dev/sapp_init.c @@ -91,7 +91,7 @@ int MESA_platform_init(int argc, char *argv[]) char gateway_mac[32] = {}; int TcpAllEnable = 0; int load_plug_sw = 1; - unsigned short udp_stream_timeout = 300, max_unorder_num; + unsigned short udp_stream_timeout = 300; unsigned short link_timeout = 600; int int_tmp; |
