mirror of https://github.com/nirenjan/libx52.git
x52test: Clean up compiler warnings
parent
37162510ac
commit
09eb7d31e8
|
@ -162,7 +162,7 @@ static int run_tests(int test_set)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void underline(const char *msg) {
|
static void underline(const char *msg) {
|
||||||
size_t i;
|
size_t i;
|
||||||
puts(msg);
|
puts(msg);
|
||||||
for (i = 0; i < strlen(msg); i++) {
|
for (i = 0; i < strlen(msg); i++) {
|
||||||
|
@ -171,7 +171,7 @@ void underline(const char *msg) {
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
void usage(void)
|
static void usage(void)
|
||||||
{
|
{
|
||||||
puts(_("These are the available tests with a description and\n"
|
puts(_("These are the available tests with a description and\n"
|
||||||
"approximate runtime. Not specifying any tests will run\n"
|
"approximate runtime. Not specifying any tests will run\n"
|
||||||
|
@ -187,7 +187,7 @@ void usage(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
struct test_map {
|
struct test_map {
|
||||||
char *cmd;
|
const char *cmd;
|
||||||
int test_bitmap;
|
int test_bitmap;
|
||||||
};
|
};
|
||||||
const struct test_map tests[] = {
|
const struct test_map tests[] = {
|
||||||
|
|
|
@ -39,16 +39,17 @@
|
||||||
|
|
||||||
int test_leds(void)
|
int test_leds(void)
|
||||||
{
|
{
|
||||||
int rc;
|
|
||||||
print_banner(_("LEDs"));
|
print_banner(_("LEDs"));
|
||||||
|
|
||||||
/* Check if the connected device supports individual LED control */
|
{ /* Check if the connected device supports individual LED control */
|
||||||
rc = libx52_check_feature(dev, LIBX52_FEATURE_LED);
|
int rc;
|
||||||
if (rc == LIBX52_ERROR_NOT_SUPPORTED) {
|
rc = libx52_check_feature(dev, LIBX52_FEATURE_LED);
|
||||||
puts(_("Skipping LED tests since the device does not support LED control"));
|
if (rc == LIBX52_ERROR_NOT_SUPPORTED) {
|
||||||
return 0;
|
puts(_("Skipping LED tests since the device does not support LED control"));
|
||||||
} else if (rc != LIBX52_SUCCESS) {
|
return 0;
|
||||||
return rc;
|
} else if (rc != LIBX52_SUCCESS) {
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
puts(_("This cycles the LEDs through all possible states"));
|
puts(_("This cycles the LEDs through all possible states"));
|
||||||
|
|
Loading…
Reference in New Issue