Warning: printf %d of size_t
Status: Beta
Brought to you by:
pxhieu
This warning should be fixed to make the code more portable:
dataset.cpp: In static member function ‘static int dataset::write_wordmap(std::string, mapword2id*)’:
dataset.cpp:40: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘size_t’
Line 40:
fprintf(fout, "%d\n", pword2id->size());
should be:
fprintf(fout, "%zu\n", pword2id->size());