Skip to content
This repository was archived by the owner on May 11, 2020. It is now read-only.

fix build on newer gcc #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix build on newer gcc #1

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Nov 18, 2018

I have this error:

jizvash@localhost:~/openbsd-man$ make
cc -O2 -Wall -Werror -c config.c -o config.o
cc -O2 -Wall -Werror -c strlcpy.c -o strlcpy.o
cc -O2 -Wall -Werror -c man.c -o man.o
man.c: In functionmanual’:
man.c:752:41: error: ‘%sdirective output may be truncated writing up to 4095 bytes into a region of size 4093 [-Werror=format-truncation=]
  (void)snprintf(buf, sizeof(buf), "%s > %s", fmt, tpath);
                                         ^~        ~~~~~
man.c:752:8: note: ‘snprintfoutput 4 or more bytes (assuming 4099) into a destination of size 4096
  (void)snprintf(buf, sizeof(buf), "%s > %s", fmt, tpath);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:12: man.o] Error 1
jizvash@localhost:~/openbsd-man$ 

I have this error:
```
jizvash@localhost:~/openbsd-man$ make
cc -O2 -Wall -Werror -c config.c -o config.o
cc -O2 -Wall -Werror -c strlcpy.c -o strlcpy.o
cc -O2 -Wall -Werror -c man.c -o man.o
man.c: In function ‘manual’:
man.c:752:41: error: ‘%s’ directive output may be truncated writing up to 4095 bytes into a region of size 4093 [-Werror=format-truncation=]
  (void)snprintf(buf, sizeof(buf), "%s > %s", fmt, tpath);
                                         ^~        ~~~~~
man.c:752:8: note: ‘snprintf’ output 4 or more bytes (assuming 4099) into a destination of size 4096
  (void)snprintf(buf, sizeof(buf), "%s > %s", fmt, tpath);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:12: man.o] Error 1
jizvash@localhost:~/openbsd-man$ 
```
@leahneukirchen
Copy link
Member

Note that this repo is dead, we use upstream mandoc now.

@ghost
Copy link
Author

ghost commented Nov 19, 2018

oh, okay

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant