mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-27 23:30:47 +01:00
Chore: fixes compiling errors
This commit is contained in:
+1
-1
@@ -100,5 +100,5 @@ typedef const FFSmbiosHeader* FFSmbiosHeaderTable[FF_SMBIOS_TYPE__MAX];
|
||||
[[nodiscard]] const FFSmbiosHeaderTable* ffGetSmbiosHeaderTable(void);
|
||||
|
||||
#ifdef __linux__
|
||||
[[gnu::nonnull(1, 2, 3), nodiscard]] bool ffGetSmbiosValue(const char* devicesPath, const char* classPath, FFstrbuf* buffer);
|
||||
[[gnu::nonnull(1, 2, 3)]] bool ffGetSmbiosValue(const char* devicesPath, const char* classPath, FFstrbuf* buffer);
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -135,7 +135,7 @@ static void verifyRoundTrip(void) {
|
||||
|
||||
uint32_t decodedLength = 0;
|
||||
memset(decoded, 0, sizeof(decoded));
|
||||
VERIFY(ffBase64DecodeRaw(encodedLength, encoded, &decodedLength, decoded));
|
||||
ffBase64DecodeRaw(encodedLength, encoded, &decodedLength, decoded);
|
||||
VERIFY(decodedLength == length);
|
||||
VERIFY(memcmp(decoded, source, length) == 0);
|
||||
}
|
||||
|
||||
@@ -30,12 +30,12 @@
|
||||
// reading a big endian value is a no-op ...
|
||||
_Static_assert(FF_READ_BE((uint16_t) 0x1122) == (uint16_t) 0x1122, "FF_READ_BE must be the identity on a big endian host");
|
||||
_Static_assert(FF_READ_BE(0x11223344u) == 0x11223344u, "FF_READ_BE must be the identity on a big endian host");
|
||||
_Static_assert(FF_READ_BE(0x1122334455667788ull) == 0x1122334455667788ull, "FF_READ_BE must be the identity on a big endian host");
|
||||
_Static_assert(FF_READ_BE((uint64_t) 0x1122334455667788ull) == (uint64_t) 0x1122334455667788ull, "FF_READ_BE must be the identity on a big endian host");
|
||||
|
||||
// ... and reading a little endian one swaps.
|
||||
_Static_assert(FF_READ_LE((uint16_t) 0x1122) == (uint16_t) 0x2211, "FF_READ_LE must swap on a big endian host");
|
||||
_Static_assert(FF_READ_LE(0x11223344u) == 0x44332211u, "FF_READ_LE must swap on a big endian host");
|
||||
_Static_assert(FF_READ_LE(0x1122334455667788ull) == 0x8877665544332211ull, "FF_READ_LE must swap on a big endian host");
|
||||
_Static_assert(FF_READ_LE((uint64_t) 0x1122334455667788ull) == (uint64_t) 0x8877665544332211ull, "FF_READ_LE must swap on a big endian host");
|
||||
|
||||
int main(void) {
|
||||
// Everything this test asserts is checked at compile time, so reaching this line is the result.
|
||||
|
||||
Reference in New Issue
Block a user