x52test: Clean up compiler warnings

pull/22/head
nirenjan 2020-06-11 23:11:25 -07:00
parent 37162510ac
commit 09eb7d31e8
2 changed files with 12 additions and 11 deletions

View File

@ -162,7 +162,7 @@ static int run_tests(int test_set)
return 0;
}
void underline(const char *msg) {
static void underline(const char *msg) {
size_t i;
puts(msg);
for (i = 0; i < strlen(msg); i++) {
@ -171,7 +171,7 @@ void underline(const char *msg) {
putchar('\n');
}
void usage(void)
static void usage(void)
{
puts(_("These are the available tests with a description and\n"
"approximate runtime. Not specifying any tests will run\n"
@ -187,7 +187,7 @@ void usage(void)
}
struct test_map {
char *cmd;
const char *cmd;
int test_bitmap;
};
const struct test_map tests[] = {

View File

@ -39,16 +39,17 @@
int test_leds(void)
{
int rc;
print_banner(_("LEDs"));
/* Check if the connected device supports individual LED control */
rc = libx52_check_feature(dev, LIBX52_FEATURE_LED);
if (rc == LIBX52_ERROR_NOT_SUPPORTED) {
puts(_("Skipping LED tests since the device does not support LED control"));
return 0;
} else if (rc != LIBX52_SUCCESS) {
return rc;
{ /* Check if the connected device supports individual LED control */
int rc;
rc = libx52_check_feature(dev, LIBX52_FEATURE_LED);
if (rc == LIBX52_ERROR_NOT_SUPPORTED) {
puts(_("Skipping LED tests since the device does not support LED control"));
return 0;
} else if (rc != LIBX52_SUCCESS) {
return rc;
}
}
puts(_("This cycles the LEDs through all possible states"));