Skip to content

Added GNUC __attribute__ format and fix incorrect formats it found#3805

Closed
dpelle wants to merge 2 commits intovim:masterfrom
dpelle:added-attibute-printf-and-fix-incorrect-formats
Closed

Added GNUC __attribute__ format and fix incorrect formats it found#3805
dpelle wants to merge 2 commits intovim:masterfrom
dpelle:added-attibute-printf-and-fix-incorrect-formats

Conversation

@dpelle
Copy link
Member

@dpelle dpelle commented Jan 14, 2019

This PR adds some __attribute__((format(printf, ...))
to detect incorrect format at compilation time and
fix a few incorrect format it found.

@codecov-io
Copy link

Codecov Report

Merging #3805 into master will increase coverage by <.01%.
The diff coverage is 42.1%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3805      +/-   ##
==========================================
+ Coverage   78.48%   78.49%   +<.01%     
==========================================
  Files         103      103              
  Lines      141880   141880              
==========================================
+ Hits       111353   111366      +13     
+ Misses      30527    30514      -13
Impacted Files Coverage Δ
src/eval.c 85.09% <ø> (ø) ⬆️
src/netbeans.c 27.36% <0%> (+0.29%) ⬆️
src/regexp_nfa.c 91.19% <0%> (ø) ⬆️
src/if_cscope.c 76.35% <0%> (ø) ⬆️
src/spellfile.c 73.84% <0%> (ø) ⬆️
src/evalfunc.c 87.65% <0%> (ø) ⬆️
src/quickfix.c 93.33% <100%> (ø) ⬆️
src/buffer.c 79.81% <100%> (ø) ⬆️
src/sign.c 92.38% <100%> (ø) ⬆️
src/diff.c 84.29% <100%> (ø) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6057ed4...3ec0fc3. Read the comment docs.

@brammool brammool closed this in b5443cc Jan 15, 2019
VVKot added a commit to VVKot/neovim that referenced this pull request Nov 20, 2021
Problem:    printf format not checked for semsg().
Solution:   Add GNUC attribute and fix reported problems. (Dominique Pelle,
            closes vim/vim#3805)
vim/vim@b5443cc
clason pushed a commit to neovim/neovim that referenced this pull request Nov 20, 2021
Problem:    printf format not checked for semsg().
Solution:   Add GNUC attribute and fix reported problems. (Dominique Pelle,
            closes vim/vim#3805)
vim/vim@b5443cc

(Most of the changes do not apply because Neovim already uses PRId64 and other spelling mistakes were already fixed.)
muniter pushed a commit to muniter/neovim that referenced this pull request Nov 20, 2021
Problem:    printf format not checked for semsg().
Solution:   Add GNUC attribute and fix reported problems. (Dominique Pelle,
            closes vim/vim#3805)
vim/vim@b5443cc

(Most of the changes do not apply because Neovim already uses PRId64 and other spelling mistakes were already fixed.)
Shougo pushed a commit to Shougo/neovim that referenced this pull request Dec 1, 2021
Problem:    printf format not checked for semsg().
Solution:   Add GNUC attribute and fix reported problems. (Dominique Pelle,
            closes vim/vim#3805)
vim/vim@b5443cc

(Most of the changes do not apply because Neovim already uses PRId64 and other spelling mistakes were already fixed.)
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request Jan 5, 2026
Problem:    printf format not checked for semsg().
Solution:   Add GNUC attribute and fix reported problems. (Dominique Pelle,
            closes vim/vim#3805)

vim/vim@b5443cc

Cherry-pick a change from patch 8.2.3830.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
zeertzjq added a commit to neovim/neovim that referenced this pull request Jan 5, 2026
Problem:    printf format not checked for semsg().
Solution:   Add GNUC attribute and fix reported problems. (Dominique Pelle,
            closes vim/vim#3805)

vim/vim@b5443cc

Cherry-pick a change from patch 8.2.3830.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
benja2998 added a commit to icevim-editor/icevim that referenced this pull request Jan 5, 2026
Problem:    printf format not checked for semsg().
Solution:   Add GNUC attribute and fix reported problems. (Dominique Pelle,
            closes vim/vim#3805)

vim/vim@b5443cc

Cherry-pick a change from patch 8.2.3830.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
github-actions bot pushed a commit to neovim/neovim that referenced this pull request Jan 8, 2026
Problem:    printf format not checked for semsg().
Solution:   Add GNUC attribute and fix reported problems. (Dominique Pelle,
            closes vim/vim#3805)

vim/vim@b5443cc

Cherry-pick a change from patch 8.2.3830.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
(cherry picked from commit ef52242)
github-actions bot pushed a commit to neovim/neovim that referenced this pull request Jan 8, 2026
Problem:    printf format not checked for semsg().
Solution:   Add GNUC attribute and fix reported problems. (Dominique Pelle,
            closes vim/vim#3805)

vim/vim@b5443cc

Cherry-pick a change from patch 8.2.3830.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
(cherry picked from commit ef52242)
HarshK97 pushed a commit to HarshK97/neovim that referenced this pull request Feb 13, 2026
Problem:    printf format not checked for semsg().
Solution:   Add GNUC attribute and fix reported problems. (Dominique Pelle,
            closes vim/vim#3805)

vim/vim@b5443cc

Cherry-pick a change from patch 8.2.3830.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
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