Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCC 8 Compiler Warning Fixes, remove unused function #24249

Merged
merged 1 commit into from Aug 16, 2018

Conversation

wddgit
Copy link
Contributor

@wddgit wddgit commented Aug 8, 2018

This function has erroneous code that is causing the warning.
It also contains other code that appears to be nonsense.
The file descriptors passed to FD_SET and FD_ISSET don't
match. Not only does nothing in the repository call this,
the function as written could not work properly.

This function has erroneous code that is causing the warning.
It also contains other code that appears to be nonsense.
The file descriptors passed to FD_SET and FD_ISSET don't
match. Not only does nothing in the repository call this,
the function as written could not work properly.
@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 8, 2018

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 8, 2018

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 8, 2018

A new Pull Request was created by @wddgit (W. David Dagenhart) for master.

It involves the following packages:

IORawData/DTCommissioning

@arunhep, @tocheng, @cmsbuild, @franzoni, @pohsun, @lpernie can you please review it and eventually sign? Thanks.
@mmusich, @tocheng this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@wddgit
Copy link
Contributor Author

wddgit commented Aug 8, 2018

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 8, 2018

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/29739/console Started: 2018/08/08 18:29

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 8, 2018

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 8, 2018

Comparison job queued.

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 8, 2018

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-24249/29739/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 31
  • DQMHistoTests: Total histograms compared: 2891469
  • DQMHistoTests: Total failures: 2
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2891277
  • DQMHistoTests: Total skipped: 190
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 30 files compared)
  • Checked 129 log files, 14 edm output root files, 31 DQM output files

@lpernie
Copy link
Contributor

lpernie commented Aug 8, 2018

Hello @wddgit , are you sure we can simply remove WaitData? Maybe there is some other workflow we should test?

@wddgit
Copy link
Contributor Author

wddgit commented Aug 8, 2018

As far as I can see there is absolutely nothing in the CMSSW repository that calls this function (based on a text search with LXR). So there is no workflow that could test it unless there is a test outside the CMSSW repository (or something really really bizarre). After spending time reading documentation about the select function, I came to the conclusion that this function is not even properly coded. Even if someone tried to use it, it looks broken to me.

@lpernie
Copy link
Contributor

lpernie commented Aug 8, 2018

Thanks a lot for the checks, I also reached the same conclusion looking at lxr/cmsglimpse.
I would anyway wait for the feedback from other DT experts as @ptraczyk mentioned on #24231 , since I am not familiar at all with FD_ISSET, FD_SET.

@wddgit
Copy link
Contributor Author

wddgit commented Aug 15, 2018

Maybe we can go ahead with this one and merge it. We've given the experts a week and no response, probably because nobody uses or cares about the function being deleted. In the worst case, something outside the repository will fail to compile when it is upgraded to a release containing this change. It is much more likely nothing uses it anywhere and no one will notice. The function appears to me to be incorrectly written in 3 ways. I am not sure, but I doubt it would do what the author originally intended, so it would be good to draw their attention to it in the unlikely case it is actually being used.

It is easy to resurrect code and bring it back if necessary.

@fabiocos
Copy link
Contributor

@lpernie @wddgit a lack of response could be also linked to the vacation period. Anyway, if nothing in the release is sensitive to this function, I would suggest to move forward, private could could be adjusted afterwards (and anyway if the removed code is buggy it would be a good opportunity to review it)

@wddgit
Copy link
Contributor Author

wddgit commented Aug 15, 2018

Just for the record in case someone comes back to fix this, the 3 problems I see (from reading documentation, I'd never heard of the 'select' function before trying to fix this compiler warning):

  1. The 3 arguments that are pointers to fd_set objects should point to 3 different objects. That is what the compiler warning is complaining about.

  2. The file descriptor argument to FD_ISSET should match the file descriptor passed to FD_SET. sock and 0 might not match. Typically 0 is standard input and I naively would expect a socket to have a different file descriptor, not really sure about this.

  3. The first argument to select is supposed to be 1 greater than the highest file descriptor. If sock is really zero, then the current argument (which is hard coded to 1) is OK. But otherwise it is a bug.

@lpernie
Copy link
Contributor

lpernie commented Aug 15, 2018

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2)

@fabiocos
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit c4d6dfb into cms-sw:master Aug 16, 2018
@wddgit wddgit deleted the gcc8CompilerWarnings21 branch August 30, 2018 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants