diff options
| author | Xiaoqing MA <[email protected]> | 2018-07-16 15:46:40 +0800 |
|---|---|---|
| committer | Xiaoqing MA <[email protected]> | 2018-07-16 15:46:40 +0800 |
| commit | 1d8973d945fd39b16f66cf2f7a9e72b4c3ed507d (patch) | |
| tree | c74d6081592a59d25cdeabcc9e5e756cd969219f | |
| parent | 519a649207ae31f44f1f38bc83e55fcc366613b7 (diff) | |
修改printf对应数据类型问题
| -rw-r--r-- | test/test | bin | 20448 -> 20400 bytes | |||
| -rw-r--r-- | test/test.c | 10 | ||||
| -rw-r--r-- | test/test_dir | bin | 25696 -> 25656 bytes | |||
| -rw-r--r-- | test/test_dir.c | 10 |
4 files changed, 10 insertions, 10 deletions
| Binary files differ diff --git a/test/test.c b/test/test.c index 935e565..305bc2c 100644 --- a/test/test.c +++ b/test/test.c @@ -17,7 +17,7 @@ buff_inf *buff_get(char *vfile) { FILE *fr = NULL; char *buff_ori = (char *)malloc(sizeof(char)*SIZE_BUFF); char *buff = buff_ori; - memset(buff, 0, sizeof(buff)); + //memset(buff, 0, sizeof(char)*SIZE_BUFF); if ((fr = fopen(vfile, "rb")) == NULL) { perror("fopen error:"); @@ -75,10 +75,10 @@ int main(int argc, char *argv[]) if (ret != ret_sig) { printf("-----------------data of [%s] is kind of [%d].\n",vfile,ret); - printf("size of whole buff is %d.\n", buff_inf_h->size); + printf("size of whole buff is %zd.\n", buff_inf_h->size); if (sig_choose_all == 0) { - printf("size of chosen buff is %d.\n", size); + printf("size of chosen buff is %zd.\n", size); } } @@ -86,10 +86,10 @@ int main(int argc, char *argv[]) else { printf("-----------------data of [%s] is kind of [%d].\n", vfile, ret); - printf("size of whole buff is %d.\n", buff_inf_h->size); + printf("size of whole buff is %zd.\n", buff_inf_h->size); if (sig_choose_all == 0) { - printf("size of chosen buff is %d.\n", size); + printf("size of chosen buff is %zd.\n", size); } } free(buff_inf_h->buff); diff --git a/test/test_dir b/test/test_dir Binary files differindex ef2c7d5..2020555 100644 --- a/test/test_dir +++ b/test/test_dir diff --git a/test/test_dir.c b/test/test_dir.c index ff28e49..6e464eb 100644 --- a/test/test_dir.c +++ b/test/test_dir.c @@ -17,7 +17,7 @@ buff_inf *buff_get(char *vfile) { FILE *fr = NULL; char *buff_ori = (char *)malloc(sizeof(char)*SIZE_BUFF); char *buff = buff_ori; - memset(buff, 0, sizeof(buff)); + //memset(buff, 0, sizeof(char)*SIZE_BUFF); if ((fr = fopen(vfile, "rb")) == NULL) { perror("fopen error:"); @@ -92,18 +92,18 @@ int main(int argc, char *argv[]) if (ret != ret_sig) { printf("-----------------data of [%s] is kind of [%d].\n", dp->d_name, ret); - printf("size of whole buff is %d.\n", buff_inf_h->size); + printf("size of whole buff is %zd.\n", buff_inf_h->size); if (sig_choose_all == 0) - printf("size of chosen buff is %d.\n", size); + printf("size of chosen buff is %zd.\n", size); } } else { printf("-----------------data of [%s] is kind of [%d].\n", dp->d_name, ret); - printf("size of whole buff is %d.\n", buff_inf_h->size); + printf("size of whole buff is %zd.\n", buff_inf_h->size); if (sig_choose_all == 0) - printf("size of chosen buff is %d.\n", size); + printf("size of chosen buff is %zd.\n", size); } free(buff_inf_h->buff); buff_inf_h->buff = NULL; |
