diff options
author | Chris Robinson <[email protected]> | 2023-12-13 22:18:09 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-12-13 22:18:09 -0800 |
commit | 760ada93e88d3c78f6613b52eb5ef15c1564ad80 (patch) | |
tree | e3aebec8d8a4c509163d4a155c525c8c0248ef01 /utils/openal-info.c | |
parent | 70b3776032adf05a92fda89ac5f56eb705d06748 (diff) |
Fix clang-tidy warnings from the examples and utilities
Diffstat (limited to 'utils/openal-info.c')
-rw-r--r-- | utils/openal-info.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/utils/openal-info.c b/utils/openal-info.c index cb013098..669727a6 100644 --- a/utils/openal-info.c +++ b/utils/openal-info.c @@ -45,11 +45,11 @@ #define FUNCTION_CAST(T, ptr) (T)(ptr) #endif -#define MAX_WIDTH 80 +enum { MaxWidth = 80 }; static void printList(const char *list, char separator) { - size_t col = MAX_WIDTH, len; + size_t col = MaxWidth, len; const char *indent = " "; const char *next; @@ -71,7 +71,7 @@ static void printList(const char *list, char separator) else len = strlen(list); - if(len + col + 2 >= MAX_WIDTH) + if(len + col + 2 >= MaxWidth) { fprintf(stdout, "\n%s", indent); col = strlen(indent); @@ -393,7 +393,7 @@ static void printEFXInfo(ALCdevice *device) palFilteri(object, AL_FILTER_TYPE, filters[i]); if(alGetError() != AL_NO_ERROR) - memmove(current, next+1, strlen(next)); + memmove(current, next+1, strlen(next)); /* NOLINT(clang-analyzer-security.insecureAPI.*) */ else current = next+1; } @@ -412,7 +412,7 @@ static void printEFXInfo(ALCdevice *device) palEffecti(object, AL_EFFECT_TYPE, effects[i]); if(alGetError() != AL_NO_ERROR) - memmove(current, next+1, strlen(next)); + memmove(current, next+1, strlen(next)); /* NOLINT(clang-analyzer-security.insecureAPI.*) */ else current = next+1; } @@ -425,7 +425,7 @@ static void printEFXInfo(ALCdevice *device) palEffecti(object, AL_EFFECT_TYPE, dedeffects[i]); if(alGetError() != AL_NO_ERROR) - memmove(current, next+1, strlen(next)); + memmove(current, next+1, strlen(next)); /* NOLINT(clang-analyzer-security.insecureAPI.*) */ else current = next+1; } @@ -436,7 +436,7 @@ static void printEFXInfo(ALCdevice *device) { char *next = strchr(current, ','); assert(next != NULL); - memmove(current, next+1, strlen(next)); + memmove(current, next+1, strlen(next)); /* NOLINT(clang-analyzer-security.insecureAPI.*) */ } } printf("Supported effects:"); |