Bug 49180

Summary: incorrect output with -i flag
Product: Sisyphus Reporter: Sergey Bolshakov <sbolshakov>
Component: xxdAssignee: Gleb F-Malinovskiy <glebfm>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: normal    
Priority: P5 CC: admsasha, glebfm, ldv
Version: unstable   
Hardware: all   
OS: Linux   
URL: https://github.com/vim/vim/issues/13876

Description Sergey Bolshakov 2024-01-25 12:41:27 MSK
$ date > file  
$ rpmquery xxd
xxd-9.0.2136-alt1.aarch64
$ xxd -i file 
unsigned char file[] = {
  0x54, 0x68, 0x75, 0x20, 0x4a, 0x61, 0x6e, 0x20, 0x32, 0x35, 0x20, 0x31,
  0x32, 0x3a, 0x33, 0x31, 0x3a, 0x30, 0x33, 0x20, 0x4d, 0x53, 0x4b, 0x20,
  0x32, 0x30, 0x32, 0x34, 0x0a
};
unsigned int file_len = 29;

(обновляемся ...)

$ rpmquery xxd            
xxd-9.1.0050-alt1.aarch64
$ xxd -i file 
unsigned char file[] = {
  0x54, 0x68, 0x75, 0x20, 0x4a, 0x61, 0x6e, 0x20, 0x32, 0x35, 0x20, 0x31,
  0x32, 0x3a, 0x33, 0x31, 0x3a, 0x30, 0x33, 0x20, 0x4d, 0x53, 0x4b, 0x20,
  0x32, 0x30, 0x32, 0x34, 0x0a
};
size_t file_len = 29;

как видно, file_len из unsigned_int стал size_t -- без включения stddef.h,
и компиляция такого сгенерированного файла заканчивается неудачей.
Comment 1 Repository Robot 2024-01-25 18:03:51 MSK
vim-4:9.1.0050-alt2 -> sisyphus:

 Thu Jan 25 2024 Gleb F-Malinovskiy <glebfm@altlinux> 4:9.1.0050-alt2
 - Reverted upstream commit "patch 9.1.0041: xxd -i may generate incorrect C
   statements" to fix regression in xxd -i output (ALT#49180).