[gnutls-devel] GnuTLS | lib: Fix Wunterminated-string-initialization warnings (!2029)
    Read-only notification of GnuTLS library development activities 
    gnutls-devel at lists.gnutls.org
       
    Tue Oct 14 18:16:09 CEST 2025
    
    
  
Samuel Zeter created a merge request: https://gitlab.com/gnutls/gnutls/-/merge_requests/2029
Project:Branches: szeter/gnutls:Wunterminated-string-initialization to gnutls/gnutls:master
Author:   Samuel Zeter
Approvers: Nikos Mavrogiannopoulos, Tom, Ander Juaristi, Andreas Metzler, Airtower, Alicja Kario (@mention me if you need reply), Ajit Singh, Anderson Sasaki, Tomáš Mráz, Tim Rühsen, František Krenželok, civodul, GnuTLS devel mailing list, George Pantelakis, Niels Möller, Sahana Prasad, Dmitry Baryshkov, Zoltán Fridrich, Alexander Sosedkin, Simon Josefsson, Stephan Mueller, GnuTLS bot and Daiki Ueno
* lib: Fix Wunterminated-string-initialization warnings
Building on a newer gcc version (15) results in the following warnings:
status_request.c: In function 'client_send':
status_request.c:71:33: warning: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (6 chars into 5 available) [-Wunterminated-string-initialization]
   71 |         const uint8_t data[5] = "\x01\x00\x00\x00\x00";
      |                                 ^~~~~~~~~~~~~~~~~~~~~~
x86-common.c: In function 'check_phe_partial':
x86-common.c:342:31: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (65 chars into 64 available) [-Wunterminated-string-initialization]
  342 |         const char text[64] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
      |
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Samuel Zeter <samuelzeter at gmail.com>
## Checklist
 * [x ] Commits have `Signed-off-by:` with name/author being identical to the commit author
 * [ ] Code modified for feature
 * [ ] Test suite updated with functionality tests
 * [ ] Test suite updated with negative tests
 * [ ] Documentation updated / NEWS entry present (for non-trivial changes)
## Reviewer's checklist:
 * [ ] Any issues marked for closing are addressed
 * [ ] There is a test suite reasonably covering new functionality or modifications
 * [ ] Function naming, parameters, return values, types, etc., are consistent and according to `CONTRIBUTION.md`
 * [ ] This feature/change has adequate documentation added
 * [ ] No obvious mistakes in the code
-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/2029
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20251014/fa656fe4/attachment-0001.html>
    
    
More information about the Gnutls-devel
mailing list