1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

13 Commits

Author SHA1 Message Date
Zdenek Kabelac
85e2c7e14d cov: explicitely ignore function result 2020-09-01 17:57:50 +02:00
Zdenek Kabelac
fd96f1014b gcc: zero-sized array to fexlible array C99
Switch remaining zero sized struct to flexible arrays to be C99
complient.

These simple rules should apply:

- The incomplete array type must be the last element within the structure.
- There cannot be an array of structures that contain a flexible array member.
- Structures that contain a flexible array member cannot be used as a member of another structure.
- The structure must contain at least one named member in addition to the flexible array member.

Although some of the code pieces should be still improved.
2020-09-01 17:57:50 +02:00
Zdenek Kabelac
0b19387dae headers: use configure.h as 1st. header
Ensure configure.h is always 1st. included header.
Maybe we could eventually introduce gcc -include option, but for now
this better uses dependency tracking.

Also move _REENTRANT and _GNU_SOURCE into configure.h so it
doesn't need to be present in various source files.
This ensures consistent compilation of headers like stdio.h since
it may produce different declaration.
2018-12-14 15:09:13 +01:00
Zdenek Kabelac
1aac59f82a gcc: avoid shadowing index
Some older headers were declaring 'index' so avoid its usage.
/usr/include/string.h:489: warning: shadowed declaration is here
2018-12-01 01:06:51 +01:00
Zdenek Kabelac
9238b972c5 cov: mark warning as expected one 2018-11-03 16:10:32 +01:00
Zdenek Kabelac
c7789daec0 cov: overflow before widen
Evaluate as 64bit arithmetic (instead of doing 32bit mults which can
in this case purely teoretically overflow).
2018-11-03 16:10:31 +01:00
Zdenek Kabelac
30b1b57506 cov: add at least ASSERT
Seems lot of code here can't handle failing allocation.
Meanwhile before bigger fix put in asserts in place.
2018-10-15 17:49:44 +02:00
Zdenek Kabelac
eed8715e1d cov: fix missing null allocation check 2018-10-15 17:49:44 +02:00
Joe Thornber
bb17302084 [radix-tree] tidy up _degrade_to_n48
Shouldn't be any functional changes.
2018-09-20 14:28:47 +01:00
Joe Thornber
ebd2d7773f [radix-tree] Fix bug in _degrade_to_n16
Values were getting shuffled
2018-09-20 14:20:16 +01:00
Joe Thornber
0ac7913c6a [radix-tree] Fix bug in _dump
Values in an n48 were not being printed in the correct order.
2018-09-20 14:18:57 +01:00
Joe Thornber
abe2210c26 [radix-tree] Add some extra checks to is_well_formed() 2018-09-20 14:18:10 +01:00
Joe Thornber
4d964133e2 [radix-tree] alternative radix-tree implementation.
Sacrifices performance for simplicity, meant only for verification of
the real adaptive implementation.
2018-09-11 13:12:07 +01:00