Commit Graph

43 Commits

Author SHA1 Message Date
Yann Collet
387e20d4f0 fixed minor conversion warning in datagen 2019-08-02 18:02:54 +02:00
Yann Collet
37f47e51a8 fixed datagen
to produce same content on both 32 and 64-bit platforms
by removing floating from literal table determination.

also : added checksum trace in compression control test,
so that it's easier to determine if test fails
as a consequence of compressing a different sample.
2019-08-02 17:34:53 +02:00
Yann Collet
ededcfca57 fix confusion between unsigned <-> U32
as suggested in #1441.

generally U32 and unsigned are the same thing,
except when they are not ...

case : 32-bit compilation for MIPS (uint32_t == unsigned long)

A vast majority of transformation consists in transforming U32 into unsigned.
In rare cases, it's the other way around (typically for internal code, such as seeds).

Among a few issues this patches solves :
- some parameters were declared with type `unsigned` in *.h,
  but with type `U32` in their implementation *.c .
- some parameters have type unsigned*,
  but the caller user a pointer to U32 instead.

These fixes are useful.

However, the bulk of changes is about %u formating,
which requires unsigned type,
but generally receives U32 values instead,
often just for brevity (U32 is shorter than unsigned).
These changes are generally minor, or even annoying.

As a consequence, the amount of code changed is larger than I would expect for such a patch.

Testing is also a pain :
it requires manually modifying `mem.h`,
in order to lie about `U32`
and force it to be an `unsigned long` typically.
On a 64-bit system, this will break the equivalence unsigned == U32.
Unfortunately, it will also break a few static_assert(), controlling structure sizes.
So it also requires modifying `debug.h` to make `static_assert()` a noop.
And then reverting these changes.

So it's inconvenient, and as a consequence,
this property is currently not checked during CI tests.
Therefore, these problems can emerge again in the future.

I wonder if it is worth ensuring proper distinction of U32 != unsigned in CI tests.
It's another restriction for coding, adding more frustration during merge tests,
since most platforms don't need this distinction (hence contributor will not see it),
and while this can matter in theory, the number of platforms impacted seems minimal.

Thoughts ?
2018-12-21 18:09:41 -08:00
Nick Terrell
f2d6db45cd [zstd] Add -Wmissing-prototypes 2018-09-27 15:24:48 -07:00
Yann Collet
3128e03be6 updated license header
to clarify dual-license meaning as "or"
2017-09-08 00:09:23 -07:00
Yann Collet
32fb407c9d updated a bunch of headers
for the new license
2017-08-18 16:52:05 -07:00
Przemyslaw Skibinski
e679741b18 _CRT_SECURE_NO_WARNINGS moved to util.h 2016-12-21 13:47:11 +01:00
Przemyslaw Skibinski
2f6ccee6af platform.h: removed Compiler Options 2016-12-21 13:23:34 +01:00
Przemyslaw Skibinski
20b089e53d simplified zstdcli.c 2016-12-21 09:19:15 +01:00
Przemyslaw Skibinski
16ae6563a2 executables use new util.h and platform.h 2016-12-21 09:06:14 +01:00
Yann Collet
a6bdf55759 fixed memory leak 2016-09-15 17:02:06 +02:00
Yann Collet
4ded9e591c added boilerplate 2016-08-30 11:06:28 -07:00
inikep
3d2c58c3a9 fixed compilation with Visual in C++ mode 2016-08-10 14:28:47 +02:00
Yann Collet
5e80dd3261 fixed minor coverity warnings 2016-07-13 19:21:57 +02:00
Yann Collet
b2b5309c6f removes Visual warning on strerror() 2016-07-03 00:20:03 +02:00
Yann Collet
ed7fb8413c extended use of strerror(errno) 2016-07-02 21:01:54 +02:00
Yann Collet
f72dc6091b removed msan tests, due to issues with datagen.c 2016-06-06 19:42:47 +02:00
Yann Collet
35276a9441 fixed minor conversion warnings 2016-05-18 17:26:23 +02:00
Yann Collet
bde926fce7 removed msan tests 2016-05-18 17:18:48 +02:00
Yann Collet
a96f9fd5bc datagencli uses mem.h 2016-05-11 11:42:51 +02:00
Yann Collet
d782890576 fixed datagen 2016-05-09 12:28:20 +02:00
Yann Collet
ceca200c77 datagen uses mem.h 2016-05-09 12:20:50 +02:00
thatsafunnyname
eef5fdb58a No stdint.h on OpenVMS.
No stdint.h on OpenVMS, it is inttypes.h instead, some projects use HAVE_STDINT_H.
2016-05-04 15:39:31 +01:00
Yann Collet
81e493651a Fixed minor conversion warning 2016-04-11 01:47:10 +02:00
Yann Collet
c51aa6ccce minor refactor 2016-04-11 01:20:14 +02:00
Yann Collet
c456077066 fixed : minor warning on return value 2016-04-11 01:12:32 +02:00
Yann Collet
2ce4923238 modified buffer management rules 2016-02-02 14:36:49 +01:00
Yann Collet
d062f1379c fixed benchmark autogen 2015-12-01 01:31:17 +01:00
Yann Collet
402fdcf1a3 fixed asan 2015-11-20 12:46:08 +01:00
Yann Collet
6a11a69b15 added : repcode generation to datagen 2015-11-20 12:00:25 +01:00
Yann Collet
d5d9bc3f82 Added : ZSTD decompression : ability to resist to noisy/faulty data source 2015-08-23 23:13:49 +01:00
Yann Collet
8b48b24821 Fixed minor visual analyzer warning 2015-07-07 17:26:17 -08:00
Yann Collet
b5e06dc7c3 Fixed a few minor visual analyzer warnings 2015-07-04 23:20:56 -08:00
Yann Collet
b6a0072699 Updated Visual projects 2015-07-04 16:23:52 -08:00
Yann Collet
213089c078 Updated FSE
Added clang and g++ tests
2015-06-18 07:43:16 -08:00
Yann Collet
5203b8c68d Updated datagen : sparse file generation 2015-03-09 13:17:36 +01:00
Yann Collet
f66d2babf8 Updated test-fullbench 2015-02-11 08:34:50 +01:00
Yann Collet
f96780683b updated fullbench, to include datagen 2015-02-11 08:19:57 +01:00
Yann Collet
fb98fd0bd4 datagen refactoring 2015-02-10 18:15:20 +01:00
Yann Collet
6610cb381c datagen is now a library, to be included in multiple programs 2015-02-09 08:00:26 +01:00
Yann Collet
759433d679 Updated fullbench tests 2015-01-24 13:31:55 +01:00
Yann Collet
18a68714d0 Fixed : issue within fullbench, reported by AJ Baxter 2015-01-24 12:08:52 +01:00
Yann Collet
4856a00164 Initial release 2015-01-24 01:58:16 +01:00