2015-01-27 17:55:18 +01:00
|
|
|
|
|
|
|
// Test library configuration for std.cfg
|
|
|
|
//
|
|
|
|
// Usage:
|
2015-02-16 22:19:51 +01:00
|
|
|
// $ cppcheck --check-library --enable=information --error-exitcode=1 --suppress=missingIncludeSystem --inline-suppr test/cfg/std.c
|
2015-01-27 17:55:18 +01:00
|
|
|
// =>
|
|
|
|
// No warnings about bad library configuration, unmatched suppressions, etc. exitcode=0
|
|
|
|
//
|
|
|
|
|
|
|
|
#include <string.h>
|
2015-01-28 16:22:45 +01:00
|
|
|
#include <stdio.h>
|
2015-02-15 15:56:05 +01:00
|
|
|
#include <stdlib.h>
|
2015-01-29 06:23:41 +01:00
|
|
|
#include <tgmath.h> // frexp
|
2015-08-16 01:21:11 +02:00
|
|
|
#include <wchar.h>
|
2015-08-16 01:29:34 +02:00
|
|
|
#include <fenv.h>
|
2015-01-27 17:55:18 +01:00
|
|
|
|
2015-08-14 01:36:44 +02:00
|
|
|
void bufferAccessOutOfBounds(void)
|
|
|
|
{
|
|
|
|
char a[5];
|
|
|
|
fgets(a,5,stdin);
|
|
|
|
// cppcheck-suppress bufferAccessOutOfBounds
|
|
|
|
fgets(a,6,stdin);
|
|
|
|
sprintf(a, "ab%s", "cd");
|
|
|
|
// cppcheck-suppress bufferAccessOutOfBounds
|
|
|
|
// cppcheck-suppress redundantCopy
|
|
|
|
sprintf(a, "ab%s", "cde");
|
|
|
|
// cppcheck-suppress redundantCopy
|
|
|
|
snprintf(a, 5, "abcde%i", 1);
|
|
|
|
// cppcheck-suppress redundantCopy
|
|
|
|
snprintf(a, 6, "abcde%i", 1); //TODO: cppcheck-suppress bufferAccessOutOfBounds
|
|
|
|
// cppcheck-suppress redundantCopy
|
|
|
|
strcpy(a,"abcd");
|
|
|
|
// cppcheck-suppress bufferAccessOutOfBounds
|
|
|
|
// cppcheck-suppress redundantCopy
|
|
|
|
strcpy(a, "abcde");
|
|
|
|
// cppcheck-suppress redundantCopy
|
|
|
|
strncpy(a,"abcde",5);
|
|
|
|
// cppcheck-suppress bufferAccessOutOfBounds
|
|
|
|
// cppcheck-suppress redundantCopy
|
|
|
|
strncpy(a,"abcde",6);
|
|
|
|
fread(a,1,5,stdin);
|
|
|
|
// cppcheck-suppress bufferAccessOutOfBounds
|
|
|
|
fread(a,1,6,stdin);
|
|
|
|
fwrite(a,1,5,stdout);
|
|
|
|
// cppcheck-suppress bufferAccessOutOfBounds
|
|
|
|
fread(a,1,6,stdout);
|
2015-02-09 16:20:28 +01:00
|
|
|
}
|
|
|
|
|
2015-02-15 15:56:05 +01:00
|
|
|
// memory leak
|
|
|
|
|
2015-08-14 01:36:44 +02:00
|
|
|
void ignoreleak(void)
|
|
|
|
{
|
2015-02-15 15:56:05 +01:00
|
|
|
char *p = (char *)malloc(10);
|
|
|
|
memset(&(p[0]), 0, 10);
|
|
|
|
// cppcheck-suppress memleak
|
|
|
|
}
|
|
|
|
|
2015-01-28 16:22:45 +01:00
|
|
|
// null pointer
|
|
|
|
|
2015-08-14 01:36:44 +02:00
|
|
|
void nullpointer(int value)
|
|
|
|
{
|
|
|
|
int res = 0;
|
|
|
|
FILE *fp;
|
|
|
|
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
clearerr(0);
|
|
|
|
// cppcheck-suppress ignoredReturnValue
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
feof(0);
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
fgetc(0);
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
fclose(0);
|
|
|
|
// cppcheck-suppress ignoredReturnValue
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
ferror(0);
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
ftell(0);
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
puts(0);
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
fp=fopen(0,0);
|
|
|
|
fclose(fp);
|
|
|
|
fp = 0;
|
|
|
|
// No FP
|
|
|
|
fflush(0);
|
|
|
|
// No FP
|
|
|
|
// cppcheck-suppress redundantAssignment
|
|
|
|
fp = freopen(0,"abc",stdin);
|
|
|
|
fclose(fp);
|
|
|
|
fp = 0;
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
fputc(0,0);
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
fputs(0,0);
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
fgetpos(0,0);
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
frexp(1.0,0);
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
fsetpos(0,0);
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
itoa(123,0,10);
|
|
|
|
putchar(0);
|
|
|
|
// cppcheck-suppress ignoredReturnValue
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
strchr(0,0);
|
|
|
|
// cppcheck-suppress ignoredReturnValue
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
strlen(0);
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
strcpy(0,0);
|
|
|
|
// cppcheck-suppress ignoredReturnValue
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
strspn(0,0);
|
|
|
|
// cppcheck-suppress ignoredReturnValue
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
strcspn(0,0);
|
|
|
|
// cppcheck-suppress ignoredReturnValue
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
strcoll(0,0);
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
strcat(0,0);
|
|
|
|
// cppcheck-suppress ignoredReturnValue
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
strcmp(0,0);
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
strncpy(0,0,1);
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
strncat(0,0,1);
|
|
|
|
// cppcheck-suppress ignoredReturnValue
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
strncmp(0,0,1);
|
|
|
|
// cppcheck-suppress ignoredReturnValue
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
strstr(0,0);
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
strtoul(0,0,0);
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
strtoull(0,0,0);
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
strtol(0,0,0);
|
|
|
|
|
|
|
|
// #6100 False positive nullPointer - calling mbstowcs(NULL,)
|
|
|
|
res += mbstowcs(0,"",0);
|
|
|
|
// cppcheck-suppress unreadVariable
|
|
|
|
res += wcstombs(0,L"",0);
|
|
|
|
|
|
|
|
strtok(NULL,"xyz");
|
|
|
|
|
|
|
|
strxfrm(0,"foo",0);
|
|
|
|
// TODO: error message
|
|
|
|
strxfrm(0,"foo",42);
|
|
|
|
|
|
|
|
snprintf(NULL, 0, "someformatstring"); // legal
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
snprintf(NULL, 42, "someformatstring"); // not legal
|
2015-01-28 16:22:45 +01:00
|
|
|
}
|
|
|
|
|
2015-08-14 01:36:44 +02:00
|
|
|
void nullpointerMemchr1(char *p, char *s)
|
|
|
|
{
|
|
|
|
// cppcheck-suppress uselessAssignmentPtrArg
|
|
|
|
p = memchr(s, 'p', strlen(s));
|
2015-01-28 16:22:45 +01:00
|
|
|
}
|
|
|
|
|
2015-08-14 01:36:44 +02:00
|
|
|
void nullpointerMemchr2(char *p, char *s)
|
|
|
|
{
|
|
|
|
// cppcheck-suppress uselessAssignmentPtrArg
|
|
|
|
p = memchr(s, 0, strlen(s));
|
2015-01-28 16:22:45 +01:00
|
|
|
}
|
|
|
|
|
2015-08-14 01:36:44 +02:00
|
|
|
void nullpointerMemchr3(char *p)
|
|
|
|
{
|
|
|
|
char *s = 0;
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
// cppcheck-suppress uselessAssignmentPtrArg
|
|
|
|
p = memchr(s, 0, strlen(s));
|
2015-01-28 16:22:45 +01:00
|
|
|
}
|
2015-01-29 06:07:48 +01:00
|
|
|
|
2015-08-14 01:36:44 +02:00
|
|
|
void nullpointerMemcmp(char *p)
|
|
|
|
{
|
|
|
|
// cppcheck-suppress ignoredReturnValue
|
|
|
|
// cppcheck-suppress nullPointer
|
|
|
|
memcmp(p, 0, 123);
|
2015-01-29 06:07:48 +01:00
|
|
|
}
|
2015-01-30 16:35:17 +01:00
|
|
|
|
|
|
|
|
|
|
|
// uninit pointers
|
|
|
|
|
2015-08-14 01:36:44 +02:00
|
|
|
void uninit_clearerr(void)
|
|
|
|
{
|
2015-01-30 16:35:17 +01:00
|
|
|
FILE *fp;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
clearerr(fp);
|
|
|
|
}
|
|
|
|
|
2015-08-14 01:36:44 +02:00
|
|
|
void uninit_fclose(void)
|
|
|
|
{
|
2015-01-30 16:35:17 +01:00
|
|
|
FILE *fp;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
fclose(fp);
|
|
|
|
}
|
|
|
|
|
2015-08-14 01:36:44 +02:00
|
|
|
void uninit_fopen(void)
|
|
|
|
{
|
2015-01-30 16:35:17 +01:00
|
|
|
const char *filename, *mode;
|
|
|
|
FILE *fp;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
fp = fopen(filename, "rt");
|
|
|
|
fclose(fp);
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
fp = fopen("filename.txt", mode);
|
|
|
|
fclose(fp);
|
|
|
|
}
|
|
|
|
|
2015-08-14 01:36:44 +02:00
|
|
|
void uninit_feof(void)
|
|
|
|
{
|
2015-01-30 16:35:17 +01:00
|
|
|
FILE *fp;
|
2015-02-25 22:03:10 +01:00
|
|
|
// cppcheck-suppress ignoredReturnValue
|
2015-01-30 16:35:17 +01:00
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
feof(fp);
|
|
|
|
}
|
|
|
|
|
2015-08-14 01:36:44 +02:00
|
|
|
void uninit_ferror(void)
|
|
|
|
{
|
2015-01-30 16:35:17 +01:00
|
|
|
FILE *fp;
|
2015-02-25 22:03:10 +01:00
|
|
|
// cppcheck-suppress ignoredReturnValue
|
2015-01-30 16:35:17 +01:00
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
ferror(fp);
|
|
|
|
}
|
|
|
|
|
2015-08-14 01:36:44 +02:00
|
|
|
void uninit_fflush(void)
|
|
|
|
{
|
2015-01-30 16:35:17 +01:00
|
|
|
FILE *fp;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
fflush(fp);
|
|
|
|
}
|
|
|
|
|
2015-08-14 01:36:44 +02:00
|
|
|
void uninit_fgetc(void)
|
|
|
|
{
|
2015-01-30 16:35:17 +01:00
|
|
|
FILE *fp;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
fgetc(fp);
|
|
|
|
}
|
|
|
|
|
2015-08-14 01:36:44 +02:00
|
|
|
void uninit_fgetpos(void)
|
|
|
|
{
|
2015-01-30 16:35:17 +01:00
|
|
|
FILE *fp;
|
|
|
|
fpos_t pos;
|
|
|
|
fpos_t *ppos;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
fgetpos(fp,&pos);
|
|
|
|
|
|
|
|
fp = fopen("filename","rt");
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
fgetpos(fp,ppos);
|
2015-02-09 16:20:28 +01:00
|
|
|
fclose(fp);
|
2015-01-30 16:35:17 +01:00
|
|
|
}
|
|
|
|
|
2015-08-14 01:36:44 +02:00
|
|
|
void uninit_fsetpos(void)
|
|
|
|
{
|
2015-01-30 16:35:17 +01:00
|
|
|
FILE *fp;
|
|
|
|
fpos_t pos;
|
|
|
|
fpos_t *ppos;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
fsetpos(fp,&pos);
|
|
|
|
|
|
|
|
fp = fopen("filename","rt");
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
fsetpos(fp,ppos);
|
2015-02-09 16:20:28 +01:00
|
|
|
fclose(fp);
|
2015-01-30 16:35:17 +01:00
|
|
|
}
|
|
|
|
|
2015-08-14 01:36:44 +02:00
|
|
|
void uninit_fgets(void)
|
|
|
|
{
|
2015-01-30 16:35:17 +01:00
|
|
|
FILE *fp;
|
|
|
|
char buf[10];
|
|
|
|
char *str;
|
|
|
|
|
|
|
|
fgets(buf,10,stdin);
|
|
|
|
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
fgets(str,10,stdin);
|
|
|
|
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
fgets(buf,10,fp);
|
|
|
|
}
|
|
|
|
|
2015-08-14 01:36:44 +02:00
|
|
|
void uninit_fputc(void)
|
|
|
|
{
|
2015-01-30 16:35:17 +01:00
|
|
|
int i;
|
|
|
|
FILE *fp;
|
|
|
|
|
|
|
|
fputc('a', stdout);
|
|
|
|
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
fputc(i, stdout);
|
|
|
|
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
fputc('a', fp);
|
|
|
|
}
|
|
|
|
|
2015-08-14 01:36:44 +02:00
|
|
|
void uninit_fputs(void)
|
|
|
|
{
|
2015-01-30 16:35:17 +01:00
|
|
|
const char *s;
|
|
|
|
FILE *fp;
|
|
|
|
|
|
|
|
fputs("a", stdout);
|
|
|
|
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
fputs(s, stdout);
|
|
|
|
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
fputs("a", fp);
|
|
|
|
}
|
|
|
|
|
2015-08-14 01:36:44 +02:00
|
|
|
void uninit_ftell(void)
|
|
|
|
{
|
2015-01-30 16:35:17 +01:00
|
|
|
FILE *fp;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
ftell(fp);
|
|
|
|
}
|
|
|
|
|
2015-08-14 01:36:44 +02:00
|
|
|
void uninit_puts(void)
|
|
|
|
{
|
2015-01-30 16:35:17 +01:00
|
|
|
const char *s;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
puts(s);
|
|
|
|
}
|
|
|
|
|
2015-08-14 01:36:44 +02:00
|
|
|
void uninit_putchar(void)
|
|
|
|
{
|
2015-01-30 16:35:17 +01:00
|
|
|
char c;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
putchar(c);
|
|
|
|
}
|
2015-02-25 22:03:10 +01:00
|
|
|
|
2015-08-16 00:52:52 +02:00
|
|
|
void uninitvar_cproj(void) // #6939
|
|
|
|
{
|
|
|
|
float complex fc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)cprojf(fc);
|
|
|
|
|
|
|
|
double complex dc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)cproj(dc);
|
|
|
|
|
|
|
|
long double complex ldc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)cprojl(ldc);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_creal(void)
|
|
|
|
{
|
|
|
|
float complex fc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)crealf(fc);
|
|
|
|
|
|
|
|
double complex dc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)creal(dc);
|
|
|
|
|
|
|
|
long double complex ldc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)creall(ldc);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_acos(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)acosf(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)acos(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)acosl(ld);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_acosh(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)acoshf(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)acosh(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)acoshl(ld);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_asctime(void)
|
|
|
|
{
|
|
|
|
const struct tm *tm;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
// cppcheck-suppress obsoleteFunctionsasctime
|
|
|
|
(void)asctime(tm);
|
|
|
|
}
|
|
|
|
|
2015-08-16 01:21:11 +02:00
|
|
|
#if 0
|
2015-08-16 00:52:52 +02:00
|
|
|
void uninitvar_assert(void)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
assert(i);
|
|
|
|
}
|
2015-08-16 01:21:11 +02:00
|
|
|
#endif
|
2015-08-16 00:52:52 +02:00
|
|
|
|
|
|
|
void uninitvar_sqrt(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)sqrtf(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)sqrt(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)sqrtl(ld);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_csqrt(void)
|
|
|
|
{
|
|
|
|
float complex fc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)csqrtf(fc);
|
|
|
|
|
|
|
|
double complex dc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)csqrt(dc);
|
|
|
|
|
|
|
|
long double complex ldc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)csqrtl(ldc);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_sinh(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)sinhf(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)sinh(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)sinhl(ld);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_sin(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)sinf(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)sin(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)sinl(ld);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_csin(void)
|
|
|
|
{
|
|
|
|
float complex fd;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)csinf(fd);
|
|
|
|
|
|
|
|
double complex dc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)csin(dc);
|
|
|
|
|
|
|
|
long double complex ldc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)csinl(ldc);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_csinh(void)
|
|
|
|
{
|
|
|
|
float complex fd;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)csinhf(fd);
|
|
|
|
|
|
|
|
double complex dc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)csinh(dc);
|
|
|
|
|
|
|
|
long double complex ldc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)csinhl(ldc);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_asin(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)asinf(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)asin(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)asinl(ld);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_casin(void)
|
|
|
|
{
|
|
|
|
float complex fd;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)casinf(fd);
|
|
|
|
|
|
|
|
double complex dc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)casin(dc);
|
|
|
|
|
|
|
|
long double complex ldc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)casinl(ldc);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_asinh(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)asinhf(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)asinh(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)asinhl(ld);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_casinh(void)
|
|
|
|
{
|
|
|
|
float complex fd;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)casinhf(fd);
|
|
|
|
|
|
|
|
double complex dc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)casinh(dc);
|
|
|
|
|
|
|
|
long double complex ldc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)casinhl(ldc);
|
|
|
|
}
|
|
|
|
|
2015-08-16 01:21:11 +02:00
|
|
|
void uninitvar_wcsftime(wchar_t* ptr)
|
|
|
|
{
|
|
|
|
size_t maxsize;
|
|
|
|
wchar_t* format;
|
|
|
|
struct tm* timeptr;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)wcsftime(ptr, maxsize, format, timeptr);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_tan(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)tanf(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)tan(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)tanl(ld);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_ctan(void)
|
|
|
|
{
|
|
|
|
float complex fd;
|
2015-08-16 01:29:34 +02:00
|
|
|
// cppcheck-suppress uninitvar
|
2015-08-16 01:21:11 +02:00
|
|
|
(void)ctanf(fd);
|
|
|
|
|
|
|
|
double complex dc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)ctan(dc);
|
|
|
|
|
|
|
|
long double complex ldc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)ctanl(ldc);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_tanh(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)tanhf(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)tanh(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)tanhl(ld);
|
|
|
|
}
|
|
|
|
|
2015-08-16 01:29:34 +02:00
|
|
|
void uninitvar_ctanh(void)
|
|
|
|
{
|
|
|
|
float complex fd;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)ctanhf(fd);
|
|
|
|
|
|
|
|
double complex dc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)ctanh(dc);
|
|
|
|
|
|
|
|
long double complex ldc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)ctanhl(ldc);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_feclearexcept(void)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
// cppcheck-suppress uninitvar
|
2015-08-16 15:05:42 +02:00
|
|
|
(void)feclearexcept(i);
|
2015-08-16 01:29:34 +02:00
|
|
|
}
|
|
|
|
|
2015-08-16 14:38:13 +02:00
|
|
|
void uninitvar_fegetexceptflag(fexcept_t* flagp)
|
|
|
|
{
|
|
|
|
int excepts;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)fegetexceptflag(flagp, excepts);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_feraiseexcept(void)
|
|
|
|
{
|
|
|
|
int excepts;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)feraiseexcept(excepts);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_fesetenv(void)
|
|
|
|
{
|
|
|
|
fenv_t* envp;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)fesetenv(envp);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_fesetround(void)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)fesetround(i);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_fetestexcept(void)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)fetestexcept(i);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_feupdateenv(void)
|
|
|
|
{
|
|
|
|
fenv_t* envp;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)feupdateenv(envp);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_atan(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)atanf(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)atan(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)atanl(ld);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_catan(void)
|
|
|
|
{
|
|
|
|
float complex fd;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)catanf(fd);
|
|
|
|
|
|
|
|
double complex dc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)catan(dc);
|
|
|
|
|
|
|
|
long double complex ldc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)catanl(ldc);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_tgamma(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)tgammaf(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)tgamma(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)tgammal(ld);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_trunc(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)truncf(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)trunc(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)truncl(ld);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_atanh(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)atanhf(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)atanh(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)atanhl(ld);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_catanh(void)
|
|
|
|
{
|
|
|
|
float complex fd;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)catanhf(fd);
|
|
|
|
|
|
|
|
double complex dc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)catanh(dc);
|
|
|
|
|
|
|
|
long double complex ldc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)catanhl(ldc);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_atan2(void)
|
|
|
|
{
|
|
|
|
float f1,f2;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)atan2f(f1,f2);
|
|
|
|
|
|
|
|
double d1,d2;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)atan2(d1,d2);
|
|
|
|
|
|
|
|
long double ld1,ld2;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)atan2l(ld1,ld2);
|
|
|
|
}
|
|
|
|
|
2015-08-16 14:49:35 +02:00
|
|
|
void uninitvar_atol(void)
|
|
|
|
{
|
|
|
|
char * c;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)atoi(c);
|
|
|
|
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)atol(c);
|
|
|
|
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)atoll(c);
|
|
|
|
}
|
|
|
|
|
2015-08-28 17:04:47 +02:00
|
|
|
void uninitvar_calloc(void)
|
|
|
|
{
|
|
|
|
size_t nitems;
|
|
|
|
size_t size;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
int * p = (int*) calloc(nitems, size);
|
|
|
|
free(p);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_ceil(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)ceilf(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)ceil(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)ceill(ld);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_copysign(void)
|
|
|
|
{
|
|
|
|
float f1, f2;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)copysignf(f1, f2);
|
|
|
|
|
|
|
|
double d1, d2;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)copysign(d1, d2);
|
|
|
|
|
|
|
|
long double ld1, ld2;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)copysignl(ld1, ld2);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_cbrt(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)cbrtf(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)cbrt(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)cbrtl(ld);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_cos(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)cosf(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)cos(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)cosl(ld);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_clearerr(void)
|
|
|
|
{
|
|
|
|
FILE * stream;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
clearerr(stream);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_ccos(void)
|
|
|
|
{
|
|
|
|
float complex fd;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)ccosf(fd);
|
|
|
|
|
|
|
|
double complex dc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)ccos(dc);
|
|
|
|
|
|
|
|
long double complex ldc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)ccosl(ldc);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_cosh(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)coshf(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)cosh(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)coshl(ld);
|
|
|
|
}
|
|
|
|
|
2015-08-29 00:09:33 +02:00
|
|
|
void uninitvar_ccosh(void)
|
|
|
|
{
|
|
|
|
float complex fd;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)ccoshf(fd);
|
|
|
|
|
|
|
|
double complex dc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)ccosh(dc);
|
|
|
|
|
|
|
|
long double complex ldc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)ccoshl(ldc);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_ctime(void)
|
|
|
|
{
|
|
|
|
time_t *tp;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)ctime(tp);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_difftime(void)
|
|
|
|
{
|
|
|
|
time_t t1,t2;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)difftime(t1, t2);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_div(void)
|
|
|
|
{
|
|
|
|
int num;
|
|
|
|
int denom;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)div(num,denom);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_exit(void)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
exit(i);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_erf(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)erff(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)erf(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)erfl(ld);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_erfc(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)erfcf(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)erfc(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)erfcl(ld);
|
|
|
|
}
|
|
|
|
|
2015-08-29 01:43:17 +02:00
|
|
|
void uninitvar_carg(void)
|
|
|
|
{
|
|
|
|
float complex fd;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)cargf(fd);
|
|
|
|
|
|
|
|
double complex dc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)carg(dc);
|
|
|
|
|
|
|
|
long double complex ldc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)cargl(ldc);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_exp(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)expf(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)exp(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)expl(ld);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_cexp(void)
|
|
|
|
{
|
|
|
|
float complex fd;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)cexpf(fd);
|
|
|
|
|
|
|
|
double complex dc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)cexp(dc);
|
|
|
|
|
|
|
|
long double complex ldc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)cexpl(ldc);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_cimag(void)
|
|
|
|
{
|
|
|
|
float complex fd;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)cimagf(fd);
|
|
|
|
|
|
|
|
double complex dc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)cimag(dc);
|
|
|
|
|
|
|
|
long double complex ldc;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)cimagl(ldc);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_exp2(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)exp2f(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)exp2(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)exp2l(ld);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_expm1(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)expm1f(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)expm1(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)expm1l(ld);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_fabs(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)fabsf(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)fabs(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)fabsl(ld);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_fdim(void)
|
|
|
|
{
|
|
|
|
float f1,f2;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)fdimf(f1,f2);
|
|
|
|
|
|
|
|
double d1,d2;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)fdim(d1,d2);
|
|
|
|
|
|
|
|
long double ld1,ld2;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)fdiml(ld1,ld2);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_fclose(void)
|
|
|
|
{
|
|
|
|
FILE *stream;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)fclose(stream);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_feof(void)
|
|
|
|
{
|
|
|
|
FILE *stream;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)feof(stream);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_ferror(void)
|
|
|
|
{
|
|
|
|
FILE *stream;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)ferror(stream);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_fflush(void)
|
|
|
|
{
|
|
|
|
FILE *stream;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)fflush(stream);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_fgetc(void)
|
|
|
|
{
|
|
|
|
FILE *stream;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)fgetc(stream);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_fgetwc(void)
|
|
|
|
{
|
|
|
|
FILE *stream;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)fgetwc(stream);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_fgetpos(void)
|
|
|
|
{
|
|
|
|
FILE* stream;
|
|
|
|
fpos_t *ptr;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)fgetpos(stream,ptr);
|
|
|
|
}
|
|
|
|
|
|
|
|
void uninitvar_floor(void)
|
|
|
|
{
|
|
|
|
float f;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)floorf(f);
|
|
|
|
|
|
|
|
double d;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)floor(d);
|
|
|
|
|
|
|
|
long double ld;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)floorl(ld);
|
|
|
|
}
|
|
|
|
|
|
|
|
#if 0 // #6958
|
|
|
|
void uninitvar_fma(void)
|
|
|
|
{
|
|
|
|
float f1,f2,f3;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)fmaf(f1,f2,f3);
|
|
|
|
|
|
|
|
double d1,d2,d3;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)fma(d1,d2,d3);
|
|
|
|
|
|
|
|
long double ld1,ld2,ld3;
|
|
|
|
// cppcheck-suppress uninitvar
|
|
|
|
(void)fmal(ld1,ld2,ld3);
|
|
|
|
}
|
|
|
|
#endif
|
2015-08-14 01:36:44 +02:00
|
|
|
void ignoreretrn(void)
|
|
|
|
{
|
|
|
|
char szNumbers[] = "2001 60c0c0 -1101110100110100100000 0x6fffff";
|
|
|
|
char * pEnd;
|
|
|
|
strtol(szNumbers,&pEnd,10);
|
2015-02-25 22:03:10 +01:00
|
|
|
}
|