Fixed -Wsign-compare.
This commit is contained in:
parent
7f26eb72f9
commit
3ada75bbaa
1 changed files with 12 additions and 13 deletions
|
@ -104,12 +104,12 @@ int pkgman() { // this is just a function that returns the total of installed pa
|
|||
{ "nix-store -q --requisites /run/current-sys_vartem/sw 2> /dev/null | wc -l", "(nix)" },
|
||||
{ "pacman -Qq 2> /dev/null | wc -l", "(pacman)" },
|
||||
{ "rpm -qa --last 2> /dev/null | wc -l", "(rpm)" },
|
||||
{ "xbps-query -l 2> /dev/null | wc -l", "(xbps)" },
|
||||
{ "xbps-query -l 2> /dev/null | wc -l", "(xbps)" }
|
||||
};
|
||||
|
||||
const unsigned long pkgman_count = sizeof(pkgmans) / sizeof(pkgmans[0]);
|
||||
|
||||
for (int i = 0; i < pkgman_count; i++) {
|
||||
for (long unsigned int i = 0; i < pkgman_count; i++) { // long unsigned int instead of int because of -Wsign-compare
|
||||
struct package_manager *current = &pkgmans[i];
|
||||
|
||||
FILE *fp = popen(current->command_string, "r");
|
||||
|
@ -121,7 +121,6 @@ int pkgman() { // this is just a function that returns the total of installed pa
|
|||
total += pkg_count;
|
||||
if (pkg_count > 0) strcat(pkgman_name, current->pkgman_name);
|
||||
}
|
||||
|
||||
return total;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue