mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
parsers: correct type of temporary variables for dirstate tuple fields
These fields are defined as int. This eliminates the following warning spotted by CC=clang CFLAGS='-Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wshorten-64-to-32': mercurial/parsers.c:625:29: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Wsign-compare] if (state == 'n' && mtime == now) {
This commit is contained in:
parent
ede81c8447
commit
0318e586fb
@ -606,7 +606,7 @@ static PyObject *pack_dirstate(PyObject *self, PyObject *args)
|
||||
for (pos = 0; PyDict_Next(map, &pos, &k, &v); ) {
|
||||
dirstateTupleObject *tuple;
|
||||
char state;
|
||||
uint32_t mode, size, mtime;
|
||||
int mode, size, mtime;
|
||||
Py_ssize_t len, l;
|
||||
PyObject *o;
|
||||
char *t;
|
||||
@ -636,9 +636,9 @@ static PyObject *pack_dirstate(PyObject *self, PyObject *args)
|
||||
mtime_unset = NULL;
|
||||
}
|
||||
*p++ = state;
|
||||
putbe32(mode, p);
|
||||
putbe32(size, p + 4);
|
||||
putbe32(mtime, p + 8);
|
||||
putbe32((uint32_t)mode, p);
|
||||
putbe32((uint32_t)size, p + 4);
|
||||
putbe32((uint32_t)mtime, p + 8);
|
||||
t = p + 12;
|
||||
p += 16;
|
||||
len = PyString_GET_SIZE(k);
|
||||
|
Loading…
Reference in New Issue
Block a user