Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix "format not a string literal and no format arguments" warnings #171

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

Philippe23
Copy link

@Philippe23 Philippe23 commented Sep 12, 2024

fix warnings about passing variables as printf format args. Eg:

fts-backend-xapian-functions.cpp:1024:71: warning: format not a string
literal and no format arguments [-Wformat-security]
 1024 |
 syslog(LOG_INFO,s.c_str());
       |
       ~~~~~~^~~~~~~~~~~~~~~~~~~~

Fix by using "%s" as the format arg (in front of the string variable being output).

Closes: #171

fix warnings about passing variables as printf format args.  Eg:

```
fts-backend-xapian-functions.cpp:1024:71: warning: format not a string
literal and no format arguments [-Wformat-security]
 1024 |
 syslog(LOG_INFO,s.c_str());
       |
       ~~~~~~^~~~~~~~~~~~~~~~~~~~
```

Fix by using `"%s"` as the format arg (in front of the string variable
being output).

Closes: grosjo#171
@Philippe23 Philippe23 marked this pull request as ready for review September 12, 2024 13:35
@grosjo grosjo merged commit 3f3614f into grosjo:master Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants