9903 qinfo: add typed members

Review Request #1243 - Created Oct. 16, 2018 and updated

Information
Toomas Soome
illumos-gate
9903
1242, 1241, 1240
be0bdd4...
Reviewers
general
9903 qinfo: add typed members

Build.

Issues

  • 1
  • 3
  • 0
  • 4
Description From Last Updated
Are we certain that __unused works everywhere? I don't recall when this was added (or if it was added) to ... Garrett D'Amore Garrett D'Amore
Andrew Stormont
Dan McDonald
Toomas Soome
Review request changed
Dan McDonald
Ship It!
Hans Rosenfeld
I see you're using /*ARGSUSED*/ and __unused, sometimes both on the same function. I generally prefer _NOTE(ARGUNUSED()), but thats just me.

If it's not too much to ask, could you please check if any single one of those would be enough to pacify both lint and gcc?
  1. without ARGSUSED, the __unused does not calm the lint and _NOTE(ARGUNUSED()) does not calm gcc (4.4.4, 7, 8 tested).

Garrett D'Amore

Apart from the the use of __unused which I'm not 100% sure about, the rest of this looks good.

We do also have _NOTE(ARGUNUSED(argument)) as a solution that we've used in more places, if __unused turns out not to be sufficiently portable.

  1. AFAIK, it's an illumos thing -

    https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/sys/ccompile.h#L152

    It used to be called __GNU_UNUSED but it's a nop if the compiler is not
    gcc, otherwise a gcc attribute.

Are we certain that __unused works everywhere? I don't recall when this was added (or if it was added) to any C standard. We have historically supported compilation under Studio and GCC.... and while we have moved away from requiring Studio builds, I believe some downstreams might still be using it.

At any rate, I'd like to avoid introducing things that are gcc-isms, so if this is more broadly available or part of a C standard (especially C99, which is what we use in the kernel), it would be good to know that.

Garrett D'Amore
Ship It!
Loading...