diff mbox series

[2/6] v4l2-tracer: ignore single line comments when parsing headers

Message ID 2d822e517357f697921dec4dc0005ceff5bb0707.1701390439.git.deborah.brouwer@collabora.com (mailing list archive)
State New, archived
Headers show
Series v4l2-tracer: misc fixes and improvements | expand

Commit Message

Deborah Brouwer Dec. 1, 2023, 12:46 a.m. UTC
Just in case there are single-line comments that start with '//',
ignore them in the autogeneration script.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
---
 utils/v4l2-tracer/v4l2-tracer-gen.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/utils/v4l2-tracer/v4l2-tracer-gen.pl b/utils/v4l2-tracer/v4l2-tracer-gen.pl
index 1e4cadda..7b4f859b 100755
--- a/utils/v4l2-tracer/v4l2-tracer-gen.pl
+++ b/utils/v4l2-tracer/v4l2-tracer-gen.pl
@@ -151,7 +151,8 @@  sub clean_up_line {
 	$line =~ s/^\s+//; # remove leading whitespace
 	$line =~ s/.*\# define.*//; # zero out line if it has defines inside a structure (e.g. v4l2_jpegcompression)
 	$line =~ s/^\s*\/?\s?\*.*//; # zero out line if it has comments where the line starts with start with /* / * or just *
-	$line =~ s/\s*\/\*.*//; # remove comments at the end of a line following a member
+	$line =~ s/\s*\/\*.*//; # remove comments /* */ at the end of a line following a member
+	$line =~ s/\s*\/\/.*//; # remove comments // at the end of a line following a member
 	$line =~ s/\*\/$//; # zero out line if it has comments that begin without any slashs or asterisks but end with */
 	# zero out lines that don't have a ; or { because they are comments but without any identifying slashes or asteriks
 	if ($line !~ /.*[\;|\{].*/) {