Change in simtrace2[master]: simtrace2-sniff.c: fix printf usage

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Wed Nov 27 21:13:30 UTC 2019


Hello osmith,

I'd like you to do a code review. Please visit

    https://gerrit.osmocom.org/c/simtrace2/+/16296

to review the following change.


Change subject: simtrace2-sniff.c: fix printf usage
......................................................................

simtrace2-sniff.c: fix printf usage

Fixes:

simtrace2-sniff.c:113:4: error: format not a string literal and no format arguments [-Werror=format-security]
    printf(flag_meanings[i].str);

Change-Id: I9793c680f070e724ce89272e9e489963c7516d52
---
M host/src/simtrace2-sniff.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/96/16296/1

diff --git a/host/src/simtrace2-sniff.c b/host/src/simtrace2-sniff.c
index 7e8e5eb..b2ce4a0 100644
--- a/host/src/simtrace2-sniff.c
+++ b/host/src/simtrace2-sniff.c
@@ -110,7 +110,7 @@
 	uint32_t i;
 	for (i = 0; i < nb_flags; i++) {
 		if (flags & flag_meanings[i].value) {
-			printf(flag_meanings[i].str);
+			printf("%s", flag_meanings[i].str);
 			flags &= ~flag_meanings[i].value;
 			if (flags) {
 				printf(", ");

-- 
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16296
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: I9793c680f070e724ce89272e9e489963c7516d52
Gerrit-Change-Number: 16296
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191127/298fcfae/attachment.htm>


More information about the gerrit-log mailing list