Skip to content

src: fix checksrc warnings - #235

Closed
vszakats wants to merge 4 commits into
libssh2:masterfrom
vszakats:checksrc1
Closed

vszakats wants to merge 4 commits into
libssh2:masterfrom
vszakats:checksrc1

Conversation

@vszakats

@vszakats vszakats commented Mar 9, 2018 •

Copy link
Copy Markdown
Member

Use checksrc.pl from the curl project, with (for now) suppressed long line warnings and indentation set to 4 spaces. Fixes are whitespace for the most part.

Warning count went down from 2704 to 0 (2 suppressed.)

Also fix codespell typos, two non-ANSI C89 comments and a stray tab in include/libssh2.h.

@bagder

bagder commented Mar 9, 2018

Copy link
Copy Markdown
Member

Lovely @vszakats, me like! Maybe you could provide the script in a separate PR so that others can start playing with it too?

Do you think its possible to make the different styles as configurable options so that we can share checksrc code between the projects or is it easier to just make a separate one here?

@vszakats

Copy link
Copy Markdown
Member Author

Good idea, I'll add the script in a next PR.

The only difference compared to the original curl version, is that I edited the indentation level (to 4 from 2) and the maximum line length. That's two lines, right at the top of the script. (BTW there are ~350 lines wider than the original limit, so that's likely fixable gradually.)

It will be my first time with Perl, but otherwise it should probably be easy to make these two parameters configurable.

@vszakats

vszakats commented Mar 10, 2018 •

Copy link
Copy Markdown
Member Author

Customisable checksrc.pl added in #236

Command-line used to check libssh2 sources:

$ ./checksrc.pl -i4 -m500 *.c *.h

Use checksrc.pl from the curl project, with (for now)
suppressed long line warnings and indentation set to
4 spaces. Fixes are whitespace for the most part.

Warning count went down from 2704 to 12.

Also fix codespell typos, two non-ANSI C89 comments
and a stray tab in include/libssh2.h.
@vszakats

vszakats commented Mar 10, 2018 •

Copy link
Copy Markdown
Member Author

Addressed the remaining 22 warnings.

vszakats added a commit that referenced this pull request Mar 12, 2018
Use checksrc.pl from the curl project, with (for now)
suppressed long line warnings and indentation set to
4 spaces. Fixes are whitespace for the most part.

Warning count went down from 2704 to 12.

Also fix codespell typos, two non-ANSI C89 comments
and a stray tab in include/libssh2.h.

Ref: #235
vszakats added a commit that referenced this pull request Mar 12, 2018
vszakats added a commit that referenced this pull request Mar 12, 2018
@vszakats

Copy link
Copy Markdown
Member Author

Pushed in these commits:
e54ef17
c274a3f
ef6eaad
e1d8c63

@vszakats vszakats closed this Mar 12, 2018
@vszakats
vszakats deleted the checksrc1 branch March 12, 2018 11:12
kbulgrien pushed a commit to kbulgrien/libssh2-1.2.4-sco3.2v5.0.7 that referenced this pull request Dec 14, 2018
Use checksrc.pl from the curl project, with (for now)
suppressed long line warnings and indentation set to
4 spaces. Fixes are whitespace for the most part.

Warning count went down from 2704 to 12.

Also fix codespell typos, two non-ANSI C89 comments
and a stray tab in include/libssh2.h.

Ref: libssh2#235
kbulgrien pushed a commit to kbulgrien/libssh2-1.2.4-sco3.2v5.0.7 that referenced this pull request Dec 14, 2018
kbulgrien pushed a commit to kbulgrien/libssh2-1.2.4-sco3.2v5.0.7 that referenced this pull request Dec 14, 2018
kbulgrien pushed a commit to kbulgrien/libssh2-1.2.4-sco3.2v5.0.7 that referenced this pull request Dec 14, 2018
alex-weaver pushed a commit to alex-weaver/libssh2 that referenced this pull request Mar 23, 2023
Use checksrc.pl from the curl project, with (for now)
suppressed long line warnings and indentation set to
4 spaces. Fixes are whitespace for the most part.

Warning count went down from 2704 to 12.

Also fix codespell typos, two non-ANSI C89 comments
and a stray tab in include/libssh2.h.

Ref: libssh2#235
alex-weaver pushed a commit to alex-weaver/libssh2 that referenced this pull request Mar 23, 2023
alex-weaver pushed a commit to alex-weaver/libssh2 that referenced this pull request Mar 23, 2023
alex-weaver pushed a commit to alex-weaver/libssh2 that referenced this pull request Mar 23, 2023
vszakats added a commit that referenced this pull request Apr 24, 2026
vszakats added a commit that referenced this pull request Apr 24, 2026
To fix `ftell()` returning the size in bytes in `_libssh2_pem_parse()`.

Ref: #1880 (comment)
Follow-up to ef6eaad #235

Closes #1883
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.

2 participants