Merge pull request #10180 from akallabeth/fixes

Warning fixes, documentation update
This commit is contained in:
akallabeth 2024-05-13 09:15:46 +02:00 committed by GitHub
commit 41d63e1895
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 3 deletions

View File

@ -20,6 +20,7 @@ The following table shows the currently supported versions:
| ------- |--------------| ------------------ | | ------- |--------------| ------------------ |
| < 2.0.0 | stable-1.x | :x: | | < 2.0.0 | stable-1.x | :x: |
| 2.x.x | stable-2.0 | :heavy_check_mark: | | 2.x.x | stable-2.0 | :heavy_check_mark: |
| 3.x.x | stable-3.0 | :white_check_mark: |
| - | master | :white_check_mark: | | - | master | :white_check_mark: |

View File

@ -110,7 +110,7 @@ static char* topath(const char* base, const char* bname, const char* name)
return _strdup(base); return _strdup(base);
if (!base && !bname) if (!base && !bname)
return _strdup(bname); return _strdup(name);
if (!base) if (!base)
winpr_asprintf(&path, &plen, "%s/%s", bname, name); winpr_asprintf(&path, &plen, "%s/%s", bname, name);
@ -129,7 +129,7 @@ static void iterate_subdir_recursive(const char* base, const char* bname, const
if (!path) if (!path)
return; return;
struct DIR* d = opendir(path); DIR* d = opendir(path);
if (d) if (d)
{ {
struct dirent* dp = NULL; struct dirent* dp = NULL;

View File

@ -626,7 +626,10 @@ static void* winpr_convert_to_jpeg(const void* data, size_t size, UINT32 width,
for (size_t x = 0; x < height; x++) for (size_t x = 0; x < height; x++)
{ {
const JDIMENSION offset = x * stride; const JDIMENSION offset = x * stride;
const JSAMPLE* coffset = &cdata[offset];
/* libjpeg is not const correct, we must cast here to avoid issues
* with newer C compilers type check errors */
JSAMPLE* coffset = (JSAMPLE*)&cdata[offset];
if (jpeg_write_scanlines(&cinfo, &coffset, 1) != 1) if (jpeg_write_scanlines(&cinfo, &coffset, 1) != 1)
goto fail; goto fail;
} }