MantisBT - LibCSS
View Issue Details
0002885LibCSSLibCSSpublic2025-01-09 06:072025-01-14 13:36
Reporterأحمد المحمودي 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformPOSIXOSLinuxOS Version
Fixed in CI build #
Reported in CI build #
Summary0002885: Fails to build when compiled with -Werror=calloc-transposed-args
DescriptionWhen build libcss with -Werror=calloc-transposed-args, I get the following error:

src/select/computed.c: In function 'css__computed_style_create':
src/select/computed.c:76:27: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
   76 | s = calloc(sizeof(css_computed_style), 1);
      | ^~~~~~~~~~~~~~~~~~
src/select/computed.c:76:27: note: earlier argument should specify number of elements, later size of each element

The attached patch fixes the issue
TagsNo tags attached.
Attached Filespatch fix-calloc-args.patch (1,427) 2025-01-09 06:07
https://bugs.netsurf-browser.org/mantis/file_download.php?file_id=751&type=bug

Notes
(0002469)
Michael Orlitzky   
2025-01-14 13:36   
Hi, I think these were fixed in git already:

https://git.netsurf-browser.org/libcss.git/commit/?id=0541e18b442d2f46abc0f0b09e0db950e1b657e5

https://git.netsurf-browser.org/libcss.git/commit/?id=8619d09102d6cc34d63fe87195c548852fc93bf4

Issue History
2025-01-09 06:07أحمد المحموديNew Issue
2025-01-09 06:07أحمد المحموديFile Added: fix-calloc-args.patch
2025-01-14 13:36Michael OrlitzkyNote Added: 0002469