fix(libft): compilation failed due to different compiler version

This commit is contained in:
Khaïs COLIN 2025-02-12 15:17:47 +01:00
parent ddb2306630
commit 9e9bd1043b
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
4 changed files with 9 additions and 9 deletions

View file

@ -6,7 +6,7 @@
/* By: jguelen <marvin@42.fr> +#+ +:+ +#+ */ /* By: jguelen <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/18 16:29:21 by jguelen #+# #+# */ /* Created: 2024/10/18 16:29:21 by jguelen #+# #+# */
/* Updated: 2024/10/20 16:54:01 by jguelen ### ########.fr */ /* Updated: 2025/02/12 15:17:24 by khais ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -14,7 +14,7 @@
void ft_putchar_fd(char c, int fd) void ft_putchar_fd(char c, int fd)
{ {
write(fd, &c, 1); (void)write(fd, &c, 1);
} }
/* /*
int main(void) int main(void)

View file

@ -6,7 +6,7 @@
/* By: jguelen <marvin@42.fr> +#+ +:+ +#+ */ /* By: jguelen <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/18 16:29:21 by jguelen #+# #+# */ /* Created: 2024/10/18 16:29:21 by jguelen #+# #+# */
/* Updated: 2024/10/20 17:03:26 by jguelen ### ########.fr */ /* Updated: 2025/02/12 15:16:41 by khais ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -16,5 +16,5 @@
void ft_putendl_fd(char *s, int fd) void ft_putendl_fd(char *s, int fd)
{ {
ft_putstr_fd(s, fd); ft_putstr_fd(s, fd);
write(fd, "\n", 1); (void)write(fd, "\n", 1);
} }

View file

@ -6,7 +6,7 @@
/* By: jguelen <marvin@42.fr> +#+ +:+ +#+ */ /* By: jguelen <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/18 16:29:21 by jguelen #+# #+# */ /* Created: 2024/10/18 16:29:21 by jguelen #+# #+# */
/* Updated: 2024/10/21 12:37:18 by jguelen ### ########.fr */ /* Updated: 2025/02/12 15:17:10 by khais ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -59,11 +59,11 @@ void ft_putnbr_fd(int n, int fd)
len = ft_getnbdigits(n); len = ft_getnbdigits(n);
if (n < 0) if (n < 0)
write(fd, "-", 1); (void)write(fd, "-", 1);
while (len > 0) while (len > 0)
{ {
c = ft_abs((n / ft_pow(10, --len)) % 10) + '0'; c = ft_abs((n / ft_pow(10, --len)) % 10) + '0';
write(fd, &c, 1); (void)write(fd, &c, 1);
} }
} }
/* /*

View file

@ -6,7 +6,7 @@
/* By: jguelen <marvin@42.fr> +#+ +:+ +#+ */ /* By: jguelen <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/18 16:29:21 by jguelen #+# #+# */ /* Created: 2024/10/18 16:29:21 by jguelen #+# #+# */
/* Updated: 2024/10/20 16:59:56 by jguelen ### ########.fr */ /* Updated: 2025/02/12 15:17:16 by khais ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -15,7 +15,7 @@
void ft_putstr_fd(char *s, int fd) void ft_putstr_fd(char *s, int fd)
{ {
write(fd, s, ft_strlen(s)); (void)write(fd, s, ft_strlen(s));
} }
/* /*
int main(void) int main(void)