Skip to content

Fix some build failures due to wrong code in gzip handling:#788

Open
LocutusOfBorg wants to merge 2 commits intoCOVESA:masterfrom
LocutusOfBorg:fix-gzip
Open

Fix some build failures due to wrong code in gzip handling:#788
LocutusOfBorg wants to merge 2 commits intoCOVESA:masterfrom
LocutusOfBorg:fix-gzip

Conversation

@LocutusOfBorg
Copy link
Contributor

/dlt-daemon/src/offlinelogstorage/dlt_offline_logstorage_behavior.c:1112:48: error: passing argument 1 of 'fileno' from incompatible pointer type [-Wincompatible-pointer-types]
1112 | if (fsync(fileno(config->gzlog)) != 0) {
| ~~~~~~^~~~~~~
| |
| gzFile {aka struct gzFile_s *}

/dlt-daemon/src/offlinelogstorage/dlt_offline_logstorage.c: In function 'dlt_logstorage_filter_config_free': /dlt-daemon/src/offlinelogstorage/dlt_offline_logstorage.c:88:21: error: passing argument 1 of 'gzclose' from incompatible pointer type [-Wincompatible-pointer-types]
88 | gzclose(data->gzlog);
| ~~~~^~~~~~~
| |
| struct gzFile_s **
In file included from /dlt-daemon/src/offlinelogstorage/dlt_offline_logstorage.h:57,
from /dlt-daemon/src/offlinelogstorage/dlt_offline_logstorage.c:32:
/usr/include/zlib.h:1634:39: note: expected 'gzFile' {aka 'struct gzFile_s *'} but argument is of type 'struct gzFile_s **'
1634 | ZEXTERN int ZEXPORT gzclose(gzFile file);
| ~~~~~~~^~~~
/usr/include/zlib.h:1305:26: note: 'gzFile' declared here
1305 | typedef struct gzFile_s gzFile; / semi-opaque gzip file descriptor */
| ^~~~~~

@LocutusOfBorg
Copy link
Contributor Author

Hello, please double check this code, I'm still not sure of this gzip code...

/dlt-daemon/src/offlinelogstorage/dlt_offline_logstorage_behavior.c:1112:48: error: passing argument 1 of 'fileno' from incompatible pointer type [-Wincompatible-pointer-types]
 1112 |                         if (fsync(fileno(config->gzlog)) != 0) {
      |                                          ~~~~~~^~~~~~~
      |                                                |
      |                                                gzFile {aka struct gzFile_s *}

/dlt-daemon/src/offlinelogstorage/dlt_offline_logstorage.c: In function 'dlt_logstorage_filter_config_free':
/dlt-daemon/src/offlinelogstorage/dlt_offline_logstorage.c:88:21: error: passing argument 1 of 'gzclose' from incompatible pointer type [-Wincompatible-pointer-types]
   88 |         gzclose(data->gzlog);
      |                 ~~~~^~~~~~~
      |                     |
      |                     struct gzFile_s **
In file included from /dlt-daemon/src/offlinelogstorage/dlt_offline_logstorage.h:57,
                 from /dlt-daemon/src/offlinelogstorage/dlt_offline_logstorage.c:32:
/usr/include/zlib.h:1634:39: note: expected 'gzFile' {aka 'struct gzFile_s *'} but argument is of type 'struct gzFile_s **'
 1634 | ZEXTERN int ZEXPORT    gzclose(gzFile file);
      |                                ~~~~~~~^~~~
/usr/include/zlib.h:1305:26: note: 'gzFile' declared here
 1305 | typedef struct gzFile_s *gzFile;    /* semi-opaque gzip file descriptor */
      |                          ^~~~~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant