mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-28 01:28:30 +00:00
Fix Sonarcloud complaints
This commit is contained in:
parent
5dd23796a6
commit
fb5ce3e626
@ -175,7 +175,7 @@ static void print_tailhead(const char *type, struct text_object *obj, char *p,
|
|||||||
endofstring = strlen(p);
|
endofstring = strlen(p);
|
||||||
}
|
}
|
||||||
} else if (strcmp(type, "tail") == 0) {
|
} else if (strcmp(type, "tail") == 0) {
|
||||||
fseek(fp, -p_max_size, SEEK_END);
|
fseek(fp, (long) -p_max_size, SEEK_END);
|
||||||
i = fread(p, 1, p_max_size - 1, fp);
|
i = fread(p, 1, p_max_size - 1, fp);
|
||||||
tailstring(p, i, ht->wantedlines);
|
tailstring(p, i, ht->wantedlines);
|
||||||
} else {
|
} else {
|
||||||
|
@ -168,6 +168,7 @@ class own_window_setting : public conky::simple_config_setting<bool> {
|
|||||||
own_window_setting() : Base("own_window", false, false) {}
|
own_window_setting() : Base("own_window", false, false) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef BUILD_XDBE
|
||||||
class use_xdbe_setting : public conky::simple_config_setting<bool> {
|
class use_xdbe_setting : public conky::simple_config_setting<bool> {
|
||||||
typedef conky::simple_config_setting<bool> Base;
|
typedef conky::simple_config_setting<bool> Base;
|
||||||
|
|
||||||
@ -180,6 +181,7 @@ class use_xdbe_setting : public conky::simple_config_setting<bool> {
|
|||||||
use_xdbe_setting() : Base("double_buffer", false, false) {}
|
use_xdbe_setting() : Base("double_buffer", false, false) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#else
|
||||||
class use_xpmdb_setting : public conky::simple_config_setting<bool> {
|
class use_xpmdb_setting : public conky::simple_config_setting<bool> {
|
||||||
typedef conky::simple_config_setting<bool> Base;
|
typedef conky::simple_config_setting<bool> Base;
|
||||||
|
|
||||||
@ -191,6 +193,7 @@ class use_xpmdb_setting : public conky::simple_config_setting<bool> {
|
|||||||
public:
|
public:
|
||||||
use_xpmdb_setting() : Base("double_buffer", false, false) {}
|
use_xpmdb_setting() : Base("double_buffer", false, false) {}
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
struct colour_traits {
|
struct colour_traits {
|
||||||
static const lua::Type type = lua::TSTRING;
|
static const lua::Type type = lua::TSTRING;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user