diff --git a/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/csv_op.cc b/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/csv_op.cc index 7a84d14085744ee5c366eb149fcd82b9315e82d8..18374bb0f4523565d00643f3a98eb74d1c0070e0 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/csv_op.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/csv_op.cc @@ -168,7 +168,7 @@ int CsvOp::CsvParser::end_file(char c) { return 0; } -int CsvOp::CsvParser::countRows(char c) { +int CsvOp::CsvParser::countRows(int c) { Message m; if (c == '"') { m = Message::MS_QUOTE; @@ -701,7 +701,7 @@ int64_t CsvOp::CountTotalRows(const std::string &file) { } csv_parser.Reset(); while (ifs.good()) { - char chr = ifs.get(); + int chr = ifs.get(); if (csv_parser.countRows(chr) != 0) { break; } diff --git a/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/csv_op.h b/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/csv_op.h index 3201d1df4fcea974e51bfab4ec47da7b937ff312..1921b61bdcae3deffe7354be31a3da16c7062a11 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/csv_op.h +++ b/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/csv_op.h @@ -105,7 +105,7 @@ class CsvOp : public ParallelOp { return it->second.second(*this, c); } - int countRows(char c); + int countRows(int c); Status initCsvParser();