Skip to content

Rename dprintf() debugging macro do debugprintf()#22

Merged
kamalesh-babulal merged 1 commit into
linux-ras:masterfrom
tbaederr:master
Dec 4, 2020
Merged

Rename dprintf() debugging macro do debugprintf()#22
kamalesh-babulal merged 1 commit into
linux-ras:masterfrom
tbaederr:master

Conversation

@tbaederr
Copy link
Copy Markdown
Contributor

@tbaederr tbaederr commented Dec 1, 2020

dprintf() is a function in libc and might be included when including
stdio.h:

./sysfs.h:59:9: warning: 'dprintf' macro redefined [-Wmacro-redefined]
^
/usr/include/bits/stdio2.h:148:12: note: previous definition is here
^
1 warning generated.

This can be reproduced by compiling with clang while specifying -Wp,-D_FORTIFY_SOURCE=2 -O2 as $CFLAGS.

@kamalesh-babulal
Copy link
Copy Markdown
Contributor

Thanks for compiling it over clang. It's a matter of choice, but I am biased towards using the compact version for debugprintf() like dbg_printf().

dprintf() is a function in libc and might be included when including
stdio.h:

./sysfs.h:59:9: warning: 'dprintf' macro redefined [-Wmacro-redefined]
        ^
/usr/include/bits/stdio2.h:148:12: note: previous definition is here
           ^
1 warning generated.
@tbaederr
Copy link
Copy Markdown
Contributor Author

tbaederr commented Dec 1, 2020

Sure, updated the commit.

@kamalesh-babulal kamalesh-babulal merged commit 4d8a848 into linux-ras:master Dec 4, 2020
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