1.1 --- a/libfsserver/lib/files/test_file_accessor.cc Fri Sep 16 22:06:38 2022 +0200
1.2 +++ b/libfsserver/lib/files/test_file_accessor.cc Fri Sep 16 22:07:49 2022 +0200
1.3 @@ -1,7 +1,7 @@
1.4 /*
1.5 * A test accessor producing generated content.
1.6 *
1.7 - * Copyright (C) 2021 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 2021, 2022 Paul Boddie <paul@boddie.org.uk>
1.9 *
1.10 * This program is free software; you can redistribute it and/or
1.11 * modify it under the terms of the GNU General Public License as
1.12 @@ -68,7 +68,7 @@
1.13
1.14 char tag[32];
1.15
1.16 - sprintf(tag, "%ld:%ld", fileid, filepos);
1.17 + sprintf(tag, "%ld:%lld", fileid, filepos);
1.18
1.19 memset((void *) addr, 0, strlen(tag) + 1);
1.20 strcpy((char *) addr, tag);
2.1 --- a/tests/dstest_test_client.cc Fri Sep 16 22:06:38 2022 +0200
2.2 +++ b/tests/dstest_test_client.cc Fri Sep 16 22:07:49 2022 +0200
2.3 @@ -100,18 +100,19 @@
2.4
2.5 /* Test the data obtained. */
2.6
2.7 - unsigned long filepos = file.start_pos + offset;
2.8 - unsigned long _fileid = 0, _filepos = 0;
2.9 + offset_t filepos = file.start_pos + offset;
2.10 + unsigned long _fileid = 0;
2.11 + offset_t _filepos = 0;
2.12 char *sep = strchr(buf, ':');
2.13
2.14 if (sep != NULL)
2.15 {
2.16 *sep = '\0'; sep++;
2.17 - _fileid = atol(buf); _filepos = atol(sep);
2.18 + _fileid = atol(buf); _filepos = atoll(sep);
2.19 }
2.20
2.21 if ((fileid != _fileid) || (filepos != _filepos))
2.22 - printf("! %ld:%ld is not %ld:%ld\n", _fileid, _filepos, fileid, filepos);
2.23 + printf("! %ld:%lld is not %ld:%lld\n", _fileid, _filepos, fileid, filepos);
2.24 }
2.25 }
2.26