aboutsummaryrefslogtreecommitdiff
path: root/src/io
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2021-02-03 19:10:42 +0100
committerCharles Cabergs <me@cacharle.xyz>2021-02-03 19:22:10 +0100
commit2994c35b1f0a676c6df21854464f139507555fea (patch)
tree2f9464ce2abea5f94c7c95a28f4bf614d3d840a0 /src/io
parent9e88392537ee8863d5479b8395676e1517c9aef0 (diff)
downloadlibft-2994c35b1f0a676c6df21854464f139507555fea.tar.gz
libft-2994c35b1f0a676c6df21854464f139507555fea.tar.bz2
libft-2994c35b1f0a676c6df21854464f139507555fea.zip
Fixing -Wunused-resultHEADmaster
Diffstat (limited to 'src/io')
-rw-r--r--src/io/ft_putchar.c7
-rw-r--r--src/io/ft_putchar_fd.c7
-rw-r--r--src/io/ft_putstr_fd.c7
3 files changed, 15 insertions, 6 deletions
diff --git a/src/io/ft_putchar.c b/src/io/ft_putchar.c
index 2838f0a..8dd6f65 100644
--- a/src/io/ft_putchar.c
+++ b/src/io/ft_putchar.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/07 09:53:31 by cacharle #+# #+# */
-/* Updated: 2019/11/20 03:49:14 by cacharle ### ########.fr */
+/* Updated: 2021/02/03 19:21:40 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -14,5 +14,8 @@
void ft_putchar(char c)
{
- write(STDOUT_FILENO, &c, 1);
+ if (write(STDOUT_FILENO, &c, 1))
+ {
+ ;
+ }
}
diff --git a/src/io/ft_putchar_fd.c b/src/io/ft_putchar_fd.c
index 97d6f7a..6c9a170 100644
--- a/src/io/ft_putchar_fd.c
+++ b/src/io/ft_putchar_fd.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/07 10:42:34 by cacharle #+# #+# */
-/* Updated: 2019/11/20 03:49:28 by cacharle ### ########.fr */
+/* Updated: 2021/02/03 19:22:04 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -16,5 +16,8 @@ void ft_putchar_fd(char c, int fd)
{
if (fd < 0 || fd > OPEN_MAX)
return ;
- write(fd, &c, 1);
+ if (write(fd, &c, 1))
+ {
+ ;
+ }
}
diff --git a/src/io/ft_putstr_fd.c b/src/io/ft_putstr_fd.c
index d0279ab..3b500c2 100644
--- a/src/io/ft_putstr_fd.c
+++ b/src/io/ft_putstr_fd.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/07 10:40:15 by cacharle #+# #+# */
-/* Updated: 2019/11/20 03:47:59 by cacharle ### ########.fr */
+/* Updated: 2021/02/03 19:21:49 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -16,5 +16,8 @@ void ft_putstr_fd(char *s, int fd)
{
if (s == NULL || fd < 0 || fd > OPEN_MAX)
return ;
- write(fd, s, ft_strlen(s));
+ if (write(fd, s, ft_strlen(s)))
+ {
+ ;
+ }
}