fileno implicitly converted to pointer
Bug #402174 reported by
LaMont Jones
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
fsl (Debian) |
Fix Released
|
Unknown
|
|||
fsl (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Karmic |
Fix Released
|
High
|
Unassigned |
Bug Description
Binary package hint: fsl
Function `fileno' implicitly converted to pointer at wpng.c:279
Our automated build log filter[1] detected the problem(s) above that will
likely cause your package to segfault on 64-bit architectures (where the
size of a pointer is greater than the size of an integer.)
This is often due to a missing function prototype definition.
For more information, see [2].
Since use of implicitly converted pointers is always (eventually
and/or itermittantly) fatal to the application, they are errors.
Please correct them for your next upload.
[1] http://
[2] http://
Related branches
Changed in fsl (Ubuntu Karmic): | |
importance: | Undecided → High |
milestone: | none → karmic-alpha-6 |
status: | New → Triaged |
Changed in fsl (Ubuntu Karmic): | |
assignee: | nobody → Michael Terry (mterry) |
status: | Triaged → In Progress |
Changed in fsl (Debian): | |
status: | Unknown → New |
Changed in fsl (Debian): | |
status: | New → Fix Released |
To post a comment you must log in.
I was not able to reproduce any warning in compiling wpng.c using gcc 4.4.1-3ubuntu3 on karmic x86_64.
The fail line reported is:
[...] fileno( stdin), "rb")) == NULL) {
279 if ((wpng_info.infile = fdopen(
[...]
and personally I do not find errors in it.
The source file correctly includes stdio.h for prototypes:
typedef struct _IO_FILE FILE;
extern struct _IO_FILE *stdin;
FILE *fdopen(int fd, const char *mode);
int fileno(FILE *stream);
So we have an int coming from a call to fileno with the correct FILE structure pointer argument as input to the fdopen function which expects an integer. And gcc with -wall -pedantic does not report any error. Need to know which compiler version is used in the automatic test above.