mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-31 18:13:38 +01:00
Global: addresses AI's comments
This commit is contained in:
+1
-1
@@ -131,7 +131,7 @@ static inline void ffListReserve(FFlist* list, uint32_t elementSize, uint32_t ne
|
||||
({ \
|
||||
typedef __typeof__(*(pCompElement)) compElementType; \
|
||||
typedef bool compFuncType(const compElementType*, const compElementType*); \
|
||||
static_assert(__builtin_types_compatible_p(__typeof__(compFunc), compFuncType), "In compatible callback function"); \
|
||||
static_assert(__builtin_types_compatible_p(__typeof__(compFunc), compFuncType), "Incompatible callback function"); \
|
||||
ffListContains(&(listVar), (uint32_t) sizeof(*(pCompElement)), (pCompElement), (bool (*)(const void*, const void*)) compFunc); \
|
||||
})
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifndef __has_attribute
|
||||
#error Unsupported compiler
|
||||
#define __attribute__(x)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ const char* ffDebugWin32Error(DWORD errorCode) {
|
||||
(DWORD) errorCode,
|
||||
0,
|
||||
bufferW,
|
||||
sizeof(buffer),
|
||||
ARRAY_SIZE(bufferW),
|
||||
NULL);
|
||||
|
||||
if (len == 0) {
|
||||
|
||||
+2
-1
@@ -5,8 +5,9 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdnoreturn.h>
|
||||
|
||||
__attribute__((__noreturn__)) static void testFailed(const FFlist* list, const char* expression, int lineNo) {
|
||||
noreturn static void testFailed(const FFlist* list, const char* expression, int lineNo) {
|
||||
fputs(FASTFETCH_TEXT_MODIFIER_ERROR, stderr);
|
||||
fprintf(stderr, "[%d] %s, list:", lineNo, expression);
|
||||
for (uint32_t i = 0; i < list->length; ++i) {
|
||||
|
||||
+2
-1
@@ -4,8 +4,9 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdnoreturn.h>
|
||||
|
||||
__attribute__((__noreturn__)) static void testFailed(const FFstrbuf* strbuf, const char* expression, int lineNo) {
|
||||
noreturn static void testFailed(const FFstrbuf* strbuf, const char* expression, int lineNo) {
|
||||
fputs(FASTFETCH_TEXT_MODIFIER_ERROR, stderr);
|
||||
fprintf(stderr, "[%d] %s, strbuf:", lineNo, expression);
|
||||
ffStrbufWriteTo(strbuf, stderr);
|
||||
|
||||
Reference in New Issue
Block a user