aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/common.c6
-rw-r--r--src/lutris.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 805cf91..37c8c08 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,6 +39,6 @@ target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC ${LIBCURL_INCLUDE_DIRS})
target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC ${JSONC_INCLUDE_DIRS})
target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC ${LIBARCHIVE_INCLUDE_DIRS})
-target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -Wall -Wextra -pedantic)
+target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -Wall -Wextra -Wpedantic -Wconversion)
install(TARGETS ${CMAKE_PROJECT_NAME})
diff --git a/src/common.c b/src/common.c
index 17edbd9..29aa3db 100644
--- a/src/common.c
+++ b/src/common.c
@@ -12,18 +12,18 @@
void print_help(const struct Command* commands, const size_t size)
{
- int longestCommand = 0;
+ size_t longestCommand = 0;
for (size_t i = 0; i < size; ++i)
{
- int commandLength = strlen(commands[i].name);
+ size_t commandLength = strlen(commands[i].name);
if (commandLength > longestCommand) longestCommand = commandLength;
}
for (size_t i = 0; i < size; ++i)
{
- printf("\t%-*s\t %s\n", longestCommand, commands[i].name, commands[i].description);
+ printf("\t%-*s\t %s\n", (int)longestCommand, commands[i].name, commands[i].description);
}
}
diff --git a/src/lutris.c b/src/lutris.c
index 4bc0f0f..b80d830 100644
--- a/src/lutris.c
+++ b/src/lutris.c
@@ -22,7 +22,7 @@ COMMAND(lutris, install)
if (argc == 2)
{
struct script_t installer = lutris_getInstaller(argv[1]);
- char inp;
+ int inp;
if (installer.error == NONE)
{
@@ -30,7 +30,7 @@ COMMAND(lutris, install)
printf("Install %s - %s to the current directory?\nThis may download files and install wine versions\n(y/n)\n", installer.name, installer.version);
- if ((inp=getchar()) == 'y')
+ if ((inp = getchar()) == 'y')
{
// fetch all files required by installer
// TODO: think about storing files on disk for larger files