Comments (8)
I checked building all packages with gcc14 for fedora rawhide and i could fix most packages. Only atril failed to build because of -Wincompatible-pointer-types
warning which is treat as an error with gcc14.
@cwendling @mate-desktop/core-team
Can you please take a look at it?
from atril.
I got a FTBFS from Fedora Release Engineering group.
Atril will be removed from fedora when we don't fix the build warning.
https://bugzilla.redhat.com/show_bug.cgi?id=2260996
Sorry, i don't have the knowledge to fix it.
Please help.
@zhuyaliang @lukefromdc @cwendling @yetist @mate-desktop/core-team
from atril.
I do not have gcc 14 yet on Debian Unstable, but the warnings from the logs are a conflict between gchar
and const gchar
in lines 637 and 648 of epub-document.c
/usr/include/glib-2.0/glib/gstrfuncs.h:383:55: note: expected 'gchar **' {aka 'char **'} but argument is of type 'const gchar **' {aka 'const char **'}
383 | guint g_strv_length (gchar **str_array);
changing line 632 from
const gchar* mimetypes[] = {"application/epub+zip", "application/x-booki+zip", NULL};
to
gchar* mimetypes[] = {"application/epub+zip", "application/x-booki+zip", NULL};
stops the build warnings and (on gcc 13 anyway) the build now completes. Runtime behavior same as before, note that under wayland opening epubs fails with a warning about not being able to create an OpenGL context on that backend.
We still get these build warnings, unchanged either way. No idea if these also shut down a gcc 14 build though:
In function 'setup_document_content_list',
inlined from 'epub_document_load' at epub-document.c:1771:34:
epub-document.c:1048:26: warning: array subscript 'contentListNode {aka struct _contentListNode}[0]' is partly outside array bounds of 'unsigned char[8]' [-Warray-bounds=]
1048 | newnode->key = (gchar*)xml_get_data_from_node(itemrefptr,XML_ATTRIBUTE,(xmlChar*)"idref");
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
epub-document.c:1047:40: note: object of size 8 allocated by 'g_malloc0'
1047 | contentListNode *newnode = g_malloc0(sizeof(newnode));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
epub-document.c:1064:32: warning: array subscript 'contentListNode {aka struct _contentListNode}[0]' is partly outside array bounds of 'contentListNode[0]' {aka 'struct _contentListNode[]'} [-Warray-bounds=]
1064 | g_free (newnode->key);
| ~~~~~~~^~~~~
epub-document.c:1047:40: note: object of size 8 allocated by 'g_malloc0'
1047 | contentListNode *newnode = g_malloc0(sizeof(newnode));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
epub-document.c:1075:28: warning: array subscript 'contentListNode {aka struct _contentListNode}[0]' is partly outside array bounds of 'unsigned char[8]' [-Warray-bounds=]
1075 | newnode->value = g_filename_to_uri(absolutepath->str,NULL,&err);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
epub-document.c:1047:40: note: object of size 8 allocated by 'g_malloc0'
1047 | contentListNode *newnode = g_malloc0(sizeof(newnode));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
epub-document.c:1078:25: warning: array subscript 'contentListNode {aka struct _contentListNode}[0]' is partly outside array bounds of 'unsigned char[8]' [-Warray-bounds=]
1078 | if ( newnode->value == NULL )
| ~~~~~~~^~~~~~~
epub-document.c:1047:40: note: object of size 8 allocated by 'g_malloc0'
1047 | contentListNode *newnode = g_malloc0(sizeof(newnode));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
epub-document.c:1086:28: warning: array subscript 'contentListNode {aka struct _contentListNode}[0]' is partly outside array bounds of 'unsigned char[8]' [-Warray-bounds=]
1086 | newnode->index = indexcounter++ ;
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
epub-document.c:1047:40: note: object of size 8 allocated by 'g_malloc0'
1047 | contentListNode *newnode = g_malloc0(sizeof(newnode));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
epub-document.c:1080:32: warning: array subscript 'contentListNode {aka struct _contentListNode}[0]' is partly outside array bounds of 'contentListNode[0]' {aka 'struct _contentListNode[]'} [-Warray-bounds=]
1080 | g_free (newnode->key);
| ~~~~~~~^~~~~
epub-document.c:1047:40: note: object of size 8 allocated by 'g_malloc0'
1047 | contentListNode *newnode = g_malloc0(sizeof(newnode));
|
from atril.
@raveit65 , your fix also works with (at least with gcc-13), with behavior identical to what I tested. You can open a PR or I can do it, whichever is easier
from atril.
In function 'setup_document_content_list', inlined from 'epub_document_load' at epub-document.c:1771:34: epub-document.c:1048:26: warning: array subscript 'contentListNode {aka struct _contentListNode}[0]' is partly outside array bounds of 'unsigned char[8]' [-Warray-bounds=] 1048 | newnode->key = (gchar*)xml_get_data_from_node(itemrefptr,XML_ATTRIBUTE,(xmlChar*)"idref");
I have a fix for these newnode
warnings as part of #600.
from atril.
@raveit65 , your fix also works with (at least with gcc-13), with behavior identical to what I tested. You can open a PR or I can do it, whichever is easier
Ok, i will open a PR.
from atril.
In function 'setup_document_content_list', inlined from 'epub_document_load' at epub-document.c:1771:34: epub-document.c:1048:26: warning: array subscript 'contentListNode {aka struct _contentListNode}[0]' is partly outside array bounds of 'unsigned char[8]' [-Warray-bounds=] 1048 | newnode->key = (gchar*)xml_get_data_from_node(itemrefptr,XML_ATTRIBUTE,(xmlChar*)"idref");
I have a fix for these
newnode
warnings as part of #600.
Cool, i will test your PR.
Note those warnings will not treat as errors with gcc14, but good have fix them.
from atril.
Note those warnings will not treat as errors with gcc14, but good have fix them.
Ironically enough, those show an actual bad issue, and the blocking incompatible ones don't 🤷
from atril.
Related Issues (20)
- "Fat font" in particular PDF files (Firefox PDF viewer shows correctly)
- Scrollbar missed when mouse cursor at screen's right edge HOT 5
- Control E for "Expand Window to Fit" doesn't maximize the windows.
- Bug tracker displayed message to report issue HOT 1
- Epub document navigated by CTRL+PageUP or PageDOWN turns on huge CPU-USAGE
- Atril should not use the filename extension to determine the file type
- Unable to success execute configure script (autogen.sh) HOT 1
- Blured in fullscreen mode if I have used GDK_DPI_SCALE & GDK_SCALE
- Crash in page_set_function when EPUB navMap refers to missing file
- [Feature request]: Dark mode with inverted colors
- 1.27.0: test suite fails
- Atril since 1.27.1 depends on mate-desktop HOT 4
- Can't print PNG files
- Missing feature: managing accented letters in searches
- Some text in PDFs cut off at the top HOT 8
- Unable to open .cbr and .cbz files after upgrade to version 1.24.0-1+deb11u1 from 1.24.0-1 HOT 2
- [Feature request] Option for gapless pages
- Incorrect mimetype for .cbr comic files
- get black dots reading a epub document
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atril.