@@ -209,7 +209,7 @@ TEST_F(CloneCoreTest, ReadChunkTest2) {
209
209
.WillOnce (DoAll (SetArgPointee<1 >(info),
210
210
Return (CSErrorCode::Success)));
211
211
// 读chunk文件
212
- char chunkData[length]= { 0 };
212
+ char chunkData[length]; // NOLINT
213
213
memset (chunkData, ' a' , length);
214
214
EXPECT_CALL (*datastore_, ReadChunk (_, _, _, offset, length))
215
215
.WillOnce (DoAll (SetArrayArgument<2 >(chunkData,
@@ -240,7 +240,7 @@ TEST_F(CloneCoreTest, ReadChunkTest2) {
240
240
// 每次调HandleReadRequest后会被closure释放
241
241
std::shared_ptr<ReadChunkRequest> readRequest
242
242
= GenerateReadRequest (CHUNK_OP_TYPE::CHUNK_OP_READ, offset, length);
243
- char cloneData[length]= { 0 };
243
+ char cloneData[length]; // NOLINT
244
244
memset (cloneData, ' b' , length);
245
245
EXPECT_CALL (*copyer_, DownloadAsync (_))
246
246
.WillOnce (Invoke ([&](DownloadClosure* closure){
@@ -291,7 +291,7 @@ TEST_F(CloneCoreTest, ReadChunkTest2) {
291
291
// 每次调HandleReadRequest后会被closure释放
292
292
std::shared_ptr<ReadChunkRequest> readRequest
293
293
= GenerateReadRequest (CHUNK_OP_TYPE::CHUNK_OP_READ, offset, length);
294
- char cloneData[length]= { 0 };
294
+ char cloneData[length]; // NOLINT
295
295
memset (cloneData, ' b' , length);
296
296
EXPECT_CALL (*copyer_, DownloadAsync (_))
297
297
.WillOnce (Invoke ([&](DownloadClosure* closure){
@@ -304,7 +304,7 @@ TEST_F(CloneCoreTest, ReadChunkTest2) {
304
304
.WillRepeatedly (DoAll (SetArgPointee<1 >(info),
305
305
Return (CSErrorCode::Success)));
306
306
// 读chunk文件
307
- char chunkData[3 * PAGE_SIZE]= { 0 } ;
307
+ char chunkData[3 * PAGE_SIZE];
308
308
memset (chunkData, ' a' , 3 * PAGE_SIZE);
309
309
EXPECT_CALL (*datastore_, ReadChunk (_, _, _, 0 , 3 * PAGE_SIZE))
310
310
.WillOnce (DoAll (SetArrayArgument<2 >(chunkData,
@@ -400,7 +400,7 @@ TEST_F(CloneCoreTest, ReadChunkTest3) {
400
400
std::shared_ptr<ReadChunkRequest> readRequest
401
401
= GenerateReadRequest (CHUNK_OP_TYPE::CHUNK_OP_READ, offset, length);
402
402
SetCloneParam (readRequest);
403
- char cloneData[length]= { 0 };
403
+ char cloneData[length]; // NOLINT
404
404
memset (cloneData, ' b' , length);
405
405
EXPECT_CALL (*copyer_, DownloadAsync (_))
406
406
.WillOnce (Invoke ([&](DownloadClosure* closure){
@@ -496,7 +496,7 @@ TEST_F(CloneCoreTest, ReadChunkErrorTest) {
496
496
EXPECT_CALL (*datastore_, GetChunkInfo (_, _))
497
497
.WillOnce (DoAll (SetArgPointee<1 >(info),
498
498
Return (CSErrorCode::Success)));
499
- char cloneData[length]= { 0 };
499
+ char cloneData[length]; // NOLINT
500
500
memset (cloneData, ' b' , length);
501
501
EXPECT_CALL (*copyer_, DownloadAsync (_))
502
502
.WillOnce (Invoke ([&](DownloadClosure* closure){
@@ -524,7 +524,7 @@ TEST_F(CloneCoreTest, ReadChunkErrorTest) {
524
524
.Times (2 )
525
525
.WillRepeatedly (DoAll (SetArgPointee<1 >(info),
526
526
Return (CSErrorCode::Success)));
527
- char cloneData[length]= { 0 };
527
+ char cloneData[length]; // NOLINT
528
528
memset (cloneData, ' b' , length);
529
529
EXPECT_CALL (*copyer_, DownloadAsync (_))
530
530
.WillOnce (Invoke ([&](DownloadClosure* closure){
@@ -646,7 +646,7 @@ TEST_F(CloneCoreTest, RecoverChunkTest2) {
646
646
// 每次调HandleReadRequest后会被closure释放
647
647
std::shared_ptr<ReadChunkRequest> readRequest
648
648
= GenerateReadRequest (CHUNK_OP_TYPE::CHUNK_OP_RECOVER, offset, length); // NOLINT
649
- char cloneData[length]= { 0 };
649
+ char cloneData[length]; // NOLINT
650
650
memset (cloneData, ' b' , length);
651
651
EXPECT_CALL (*copyer_, DownloadAsync (_))
652
652
.WillOnce (Invoke ([&](DownloadClosure* closure){
@@ -705,7 +705,7 @@ TEST_F(CloneCoreTest, DisablePasteTest) {
705
705
// 每次调HandleReadRequest后会被closure释放
706
706
std::shared_ptr<ReadChunkRequest> readRequest
707
707
= GenerateReadRequest (CHUNK_OP_TYPE::CHUNK_OP_READ, offset, length);
708
- char cloneData[length]= { 0 };
708
+ char cloneData[length]; // NOLINT
709
709
memset (cloneData, ' b' , length);
710
710
EXPECT_CALL (*copyer_, DownloadAsync (_))
711
711
.WillOnce (Invoke ([&](DownloadClosure* closure){
@@ -744,7 +744,7 @@ TEST_F(CloneCoreTest, DisablePasteTest) {
744
744
// 每次调HandleReadRequest后会被closure释放
745
745
std::shared_ptr<ReadChunkRequest> readRequest
746
746
= GenerateReadRequest (CHUNK_OP_TYPE::CHUNK_OP_RECOVER, offset, length); // NOLINT
747
- char cloneData[length]= { 0 };
747
+ char cloneData[length]; // NOLINT
748
748
memset (cloneData, ' b' , length);
749
749
EXPECT_CALL (*copyer_, DownloadAsync (_))
750
750
.WillOnce (Invoke ([&](DownloadClosure* closure){
0 commit comments