address or suppress cppcheck warnings

This commit is contained in:
Mark Andrews
2019-08-08 13:52:44 +10:00
parent 30b6e93a70
commit b59fe46e76
52 changed files with 328 additions and 218 deletions

View File

@@ -73,10 +73,10 @@ clock_gettime(int32_t id, struct timespec *tp)
UNUSED(id);
result = gettimeofday(&tv, NULL);
if (result)
return (result);
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
if (result == 0) {
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
}
return (result);
}
#endif

View File

@@ -72,10 +72,10 @@ clock_gettime(int32_t id, struct timespec *tp)
UNUSED(id);
result = gettimeofday(&tv, NULL);
if (result)
return (result);
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
if (result == 0) {
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
}
return (result);
}
#endif

View File

@@ -73,10 +73,10 @@ clock_gettime(int32_t id, struct timespec *tp)
UNUSED(id);
result = gettimeofday(&tv, NULL);
if (result)
return (result);
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
if (result == 0) {
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
}
return (result);
}
#endif

View File

@@ -73,10 +73,10 @@ clock_gettime(int32_t id, struct timespec *tp)
UNUSED(id);
result = gettimeofday(&tv, NULL);
if (result)
return (result);
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
if (result == 0) {
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
}
return (result);
}
#endif

View File

@@ -73,10 +73,10 @@ clock_gettime(int32_t id, struct timespec *tp)
UNUSED(id);
result = gettimeofday(&tv, NULL);
if (result)
return (result);
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
if (result == 0) {
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
}
return (result);
}
#endif

View File

@@ -73,10 +73,10 @@ clock_gettime(int32_t id, struct timespec *tp)
UNUSED(id);
result = gettimeofday(&tv, NULL);
if (result)
return (result);
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
if (result == 0) {
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
}
return (result);
}
#endif

View File

@@ -73,10 +73,10 @@ clock_gettime(int32_t id, struct timespec *tp)
UNUSED(id);
result = gettimeofday(&tv, NULL);
if (result)
return (result);
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
if (result == 0) {
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
}
return (result);
}
#endif

View File

@@ -73,10 +73,10 @@ clock_gettime(int32_t id, struct timespec *tp)
UNUSED(id);
result = gettimeofday(&tv, NULL);
if (result)
return (result);
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
if (result == 0) {
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
}
return (result);
}
#endif

View File

@@ -73,10 +73,10 @@ clock_gettime(int32_t id, struct timespec *tp)
UNUSED(id);
result = gettimeofday(&tv, NULL);
if (result)
return (result);
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
if (result == 0) {
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
}
return (result);
}
#endif

View File

@@ -73,10 +73,10 @@ clock_gettime(int32_t id, struct timespec *tp)
UNUSED(id);
result = gettimeofday(&tv, NULL);
if (result)
return (result);
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
if (result == 0) {
tp->tv_sec = tv.tv_sec;
tp->tv_nsec = (long) tv.tv_usec * 1000;
}
return (result);
}
#endif
@@ -280,7 +280,7 @@ main(int argc, char *argv[]) {
fprintf(stderr,
"C_DestroyObject: Error = 0x%.8lX\n",
rv);
errflg = 1;
error = 1;
}
}