v4l2-tracer: use of __FILE__

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Deb,

After switching over to meson the __FILE__macro adds '../utils/v4l2-tracer/' to the
filename (since it is compiling from a relative path).

It is nicer to use __FILE_NAME__ instead of __FILE__, but that is not available
for every compiler.

See https://git.linuxtv.org/v4l-utils.git/commit/?id=de7b731c4d4a191a530322d7c6dc42ba9c7c16d8

v4l2-tracer uses __FILE__ a lot, but that really should be modified to use a
macro, just like v4l2-compliance etc. do.

It's generally one of these two variants:

utils/v4l2-tracer/trace-helper.cpp:             fprintf(stderr, "%s:%s:%d: ", __FILE__, __func__, __LINE__);
utils/v4l2-tracer/trace-helper.cpp:             fprintf(stderr, "%s:%s:%d\n", __FILE__, __func__, __LINE__);

It's rather ugly to see that duplicated some 60+ times.

Can you replace it with a macro or something? And use __FILE_NAME__ in the macro?

No hurry, but this definitely can be improved.

Regards,

	Hans



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux