Compile
cgroup
cli.cpp
cli.hpp
map.cpp
map.hpp
output
project1.cpp
Makefile
make.sh
make: Entering directory '/in'
g++ -std=c++17 -Wconversion -Wall -Werror -Wextra -pedantic -O3 -DNDEBUG -c project1.cpp
g++ -std=c++17 -Wconversion -Wall -Werror -Wextra -pedantic -O3 -DNDEBUG -c map.cpp
map.cpp: In function 'state read_map(unsigned int, unsigned int, unsigned int, map&)':
map.cpp:61:77: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
} else if (!(t == '.' || t == '#' || t == '^' || (t >= 'A' && t < 'A' + num_colors) ||
~~^~~~~~~~~~~~~~~~~~
map.cpp:62:41: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
(t >= 'a' && t < 'a' + num_colors))) {
~~^~~~~~~~~~~~~~~~~~
map.cpp: In function 'char door_to_button(char)':
map.cpp:87:14: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
return c + 32;
~~^~~~
map.cpp: In function 'char button_to_id(char)':
map.cpp:104:14: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
return c - 96;
~~^~~~
map.cpp: In function 'char id_to_button(char)':
map.cpp:111:14: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
return c + 96;
~~^~~~
map.cpp: In function 'bool is_blocked(const map&, unsigned int, unsigned int, const state&, const discovered&)':
map.cpp:125:71: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
return c == '#' || (is_door(c) && button_to_id(door_to_button(c)) != color) ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
map.cpp: In function 'void output_map(const state&, const backtrack&, const map&, discovered&, unsigned int, unsigned int, unsigned int)':
map.cpp:300:20: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (action == -1) {
~~~~~~~^~~~~
map.cpp:316:84: error: conversion to 'char' from 'size_t {aka long unsigned int}' may alter its value [-Werror=conversion]
current.color = action;
^~~~~~
map.cpp:377:25: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
for (char l = layer + 1; (unsigned int)l <= num_colors; ++l) {
~~~~~~^~~
cc1plus: all warnings being treated as errors
Makefile:62: recipe for target 'map.o' failed
make: *** [map.o] Error 1
make: Leaving directory '/in'