Skip to content

Commit 8599a22

Browse files
committed
Fixed attribute unused result problem, updated header & README.md
1 parent a71498e commit 8599a22

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Pre-compiled library files are available in the releases tab (only for Linux x86
3131
3232
int main()
3333
{
34-
pluto_init_window(false); /* Initialize pluto without anti-aliasing */
34+
pluto_init_window(); /* Initialize pluto */
3535
pluto_save_screen(); /* Save screen (restored later) */
3636
3737
for (;;)
@@ -44,8 +44,8 @@ int main()
4444
}
4545
}
4646
47-
pluto_write_out(); /* Write to outbuffer */
48-
pluto_render(); /* Render the outbuffer */
47+
pluto_write_out(); /* Write to outbuffer */
48+
pluto_render(); /* Render the outbuffer */
4949
}
5050
5151
pluto_deinit();

src/pluto.h

+2
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ typedef struct
6868
extern pluto_lib_t _pluto_canvas;
6969
/* Instance */
7070

71+
extern void pluto_init_window();
72+
7173
extern void pluto_render();
7274
/* Draw frame to stdout */
7375

src/render.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ void pluto_render()
142142
if (_pluto_canvas.use_write)
143143
{
144144
#if defined(__unix__) || defined(__linux__) || defined(BSD) || defined(__APPLE__)
145-
write(1, _pluto_canvas.buffer, _pluto_canvas.bufsize);
145+
(void)write(STDOUT_FILENO, _pluto_canvas.buffer, _pluto_canvas.bufsize);
146146
#else
147147
fputs((char *)_pluto_canvas.buffer, stdout);
148148
fflush(stdout);
@@ -155,4 +155,4 @@ void pluto_render()
155155
}
156156
_pluto_unlock_term();
157157
_pluto_canvas.busy = false;
158-
}
158+
}

0 commit comments

Comments
 (0)