Skip to content

cleanup: remove some unused functions and shrink number of includes in bareos.h#1433

Merged
pstorz merged 40 commits intobareos:masterfrom
alaaeddineelamri:dev/alaaeddineelamri/master/remove-unused-functions
May 30, 2023
Merged

cleanup: remove some unused functions and shrink number of includes in bareos.h#1433
pstorz merged 40 commits intobareos:masterfrom
alaaeddineelamri:dev/alaaeddineelamri/master/remove-unused-functions

Conversation

@alaaeddineelamri
Copy link
Contributor

@alaaeddineelamri alaaeddineelamri commented Apr 4, 2023

Thank you for contributing to the Bareos Project!

Description

This PR does the following modifications to the codebase:

  • removes most unused functions,
  • removes some other dead code within ifdef macros that are never reached.
  • extracts many includes from the bareos.h super include header file to where they are actually used
  • removes unused macros
  • replaces some macros with regular functions

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Check backport line
  • Required backport PRs have been created
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
Tests
  • Decision taken that a test is required (if not, then remove this paragraph)
  • The choice of the type of test (unit test or systemtest) is reasonable
  • Testname matches exactly what is being tested
  • On a fail, output of the test leads quickly to the origin of the fault

@alaaeddineelamri alaaeddineelamri changed the title Dev/alaaeddineelamri/master/remove unused functions remove some unused functions Apr 4, 2023
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/remove-unused-functions branch 2 times, most recently from 58fa751 to 5196e70 Compare April 4, 2023 13:28
@alaaeddineelamri alaaeddineelamri marked this pull request as ready for review April 5, 2023 08:08
@bruno-at-bareos bruno-at-bareos requested a review from pstorz April 6, 2023 10:20
@sebsura
Copy link
Contributor

sebsura commented Apr 6, 2023

I removed some unused members from FindFilesPacket.

sebsura
sebsura previously requested changes Apr 6, 2023
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/remove-unused-functions branch 2 times, most recently from 663dae3 to 0c96c5b Compare April 12, 2023 16:41
@alaaeddineelamri alaaeddineelamri marked this pull request as draft April 17, 2023 08:29
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/remove-unused-functions branch 7 times, most recently from 6ec3e7f to 9f445c9 Compare April 19, 2023 16:58
@alaaeddineelamri alaaeddineelamri changed the title remove some unused functions remove some unused functions and shrink number of includes in bareos.h Apr 19, 2023
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/remove-unused-functions branch 2 times, most recently from 9bf1b06 to e864429 Compare April 27, 2023 14:01
@alaaeddineelamri alaaeddineelamri marked this pull request as ready for review April 28, 2023 09:23
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/remove-unused-functions branch 2 times, most recently from ecacc7e to c5b8531 Compare May 12, 2023 11:42
@pstorz pstorz force-pushed the dev/alaaeddineelamri/master/remove-unused-functions branch from c5b8531 to 27cf2b0 Compare May 15, 2023 10:20
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work. Please review and cleanup the commit comments, they look unclean.

@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/remove-unused-functions branch from 27cf2b0 to 9ff9b6e Compare May 15, 2023 10:46
@alaaeddineelamri alaaeddineelamri requested a review from pstorz May 15, 2023 12:29
Alaa Eddine Elamri and others added 28 commits May 30, 2023 16:49
...  and include them where they are actually needed
... and include them where actually needed
moved the fcntl specific macro setup to 
separate `fcntl_def.h` file
@pstorz pstorz force-pushed the dev/alaaeddineelamri/master/remove-unused-functions branch from 867e14d to ab5bfa6 Compare May 30, 2023 14:49
@pstorz pstorz merged commit b58db56 into bareos:master May 30, 2023
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.

3 participants