Skip to content

Commit ec4195f

Browse files
committed
Got rid of compilation warnings
1 parent 9647552 commit ec4195f

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

CSV_Parser.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,16 @@ void CSV_Parser::AssignIsFmtUnsignedArray(const char * fmt_) {
6969

7070
CSV_Parser::CSV_Parser(const char * s, const char * fmt_, bool has_header_, char delimiter_, char quote_char_) :
7171
fmt( strdup_ignoring_u(fmt_) ),
72-
rows_count(NULL),
72+
rows_count(0),
7373
cols_count( strlen_ignoring_u(fmt_) ),
7474
has_header(has_header_),
7575
delimiter(delimiter_),
7676
quote_char(quote_char_),
77-
delim_chars({'\r', '\n', delimiter_, 0}),
77+
delim_chars{'\r', '\n', delimiter_, 0},
7878
whole_csv_supplied(false),
7979
//whole_csv_supplied((bool)s ? true : false), // in constructor where whole csv is not supplied at once it should be set to false
80-
leftover(NULL),
81-
current_col(NULL),
80+
leftover(0),
81+
current_col(0),
8282
header_parsed(!has_header_)
8383
{
8484
AssignIsFmtUnsignedArray(fmt_);
@@ -439,7 +439,7 @@ void CSV_Parser::supplyChunk(const char *s) {
439439

440440
int chars_occupied = 0;
441441
char * val = 0;
442-
while (val = parseStringValue(s, &chars_occupied)) {
442+
while ((val = parseStringValue(s, &chars_occupied))) {
443443
//debug_serial->println("rows_count = " + String(rows_count) + ", current_col = " + String(current_col) + ", val = " + String(val));
444444
if (fmt[current_col] != '-') {
445445
if (!header_parsed) {

CSV_Parser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class CSV_Parser {
5858

5959
/* Members responsible for keeping track of chunked supply of csv string. */
6060
char * leftover; // string that wasn't parsed yet because it doesn't end with delimiter or new line
61-
uint16_t current_col;
61+
int current_col;
6262
bool header_parsed;
6363

6464
/* Private methods */

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=CSV Parser
2-
version=1.2.0
2+
version=1.2.1
33
author=Michal Borowski <[email protected]>
44
maintainer=Michal Borowski <[email protected]>
55
sentence=CSV Parser for Arduino.

0 commit comments

Comments
 (0)