Page MenuHomeFreeBSD

Set some functions(helpers) as static to silence clang warning.
ClosedPublic

Authored by araujo on Jun 11 2015, 2:11 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 27 2024, 10:20 PM
Unknown Object (File)
Sep 27 2024, 8:38 PM
Unknown Object (File)
Sep 23 2024, 2:18 AM
Unknown Object (File)
Sep 21 2024, 7:05 AM
Unknown Object (File)
Sep 21 2024, 1:37 AM
Unknown Object (File)
Sep 19 2024, 8:01 AM
Unknown Object (File)
Sep 8 2024, 3:37 PM
Unknown Object (File)
Sep 8 2024, 8:47 AM
Subscribers

Details

Summary

Those functions are helpers, they are not specified at libugidfw(3)
and it is safe set it to static instead to prototype it in the
header as I suggested before.

Also initialize few variables, spotted by clang.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

araujo retitled this revision from to Set some functions(helpers) as static to silence clang warning..
araujo updated this object.
araujo edited the test plan for this revision. (Show Details)
araujo added reviewers: rodrigc, kib, ngie.

Was a review performed to ensure that there is indeed no consumers of the staticised functions outside the libugidfw ? Are there consumers of the library besides the base ?

In D2775#53148, @kib wrote:

Was a review performed to ensure that there is indeed no consumers of the staticised functions outside the libugidfw ? Are there consumers of the library besides the base ?

@kib I made a search for possible consumer of this function in two ways:

  1. find /usr/src/ | xargs grep 'bsde_parse_fsid': I made the same for every function that I'm setting as static.
  1. Also I made some research on google to see if there is any external project that might use that function.

For both items, I didn't find any external usage of it.

Best,

In D2775#53153, @araujo wrote:

Ok, typical check for such interface changes is the ports exp run.

Also, I think that it would be prudent to bump the solib version, since ABI of the library is changed, after all.

araujo edited edge metadata.

Bump the SHLIB_MAJOR to prepare this patch for an 'exp run'.

Have you checked gcc 4.2.1 as well?

Please update the commit message to note that you're fixing WARNS in the summary, itemize the changes here.

In D2775#53421, @ngie wrote:

Have you checked gcc 4.2.1 as well?

root@src0:/usr/src # cat /etc/src.conf
WITH_GCC=yes
WITH_GNUCXX=yes

Please update the commit message to note that you're fixing WARNS in the summary, itemize the changes here.

Sure.

The 'exp run' finished!
Bugzilla: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200807
Exp run result: http://package18.nyi.freebsd.org/jail.html?mastername=headamd64D2775-default
Atoine comments: 0 new failure, and i believe 0 port link against libugidfw.

@ngie:

The commit log will be:
Set some internal helpers as static and initialize few variables to silence CLANG WARNING.
Bump SHLIB_MAJOR version as the ABI potentially change.

kib edited edge metadata.
This revision is now accepted and ready to land.Jun 18 2015, 3:33 AM