mirror of https://github.com/FreeRDP/FreeRDP
Merge pull request #10332 from akallabeth/warn_fix_more
warning & cross compile fixes
This commit is contained in:
commit
6396c0ac76
|
@ -15,9 +15,16 @@
|
|||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
add_executable(sdl-common-res2bin
|
||||
convert_res_to_c.cpp
|
||||
)
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
find_package(SdlCommonRes2bin)
|
||||
else()
|
||||
add_executable(sdl-common-res2bin
|
||||
convert_res_to_c.cpp
|
||||
)
|
||||
export(TARGETS sdl-common-res2bin FILE
|
||||
"${CMAKE_BINARY_DIR}/SdlCommonRes2binConfig.cmake")
|
||||
endif()
|
||||
|
||||
|
||||
set(FACTORY_SRCS "")
|
||||
set(FACTORY_HDR "")
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
add_executable(generate_argument_docbook
|
||||
generate_argument_docbook.c
|
||||
)
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
find_package(GenerateArgumentDocbook)
|
||||
else()
|
||||
add_executable(generate_argument_docbook
|
||||
generate_argument_docbook.c
|
||||
)
|
||||
export(TARGETS generate_argument_docbook FILE
|
||||
"${CMAKE_BINARY_DIR}/GenerateArgumentDocbookConfig.cmake")
|
||||
endif()
|
||||
|
|
|
@ -348,7 +348,8 @@ int UwacWindowShmAllocBuffers(UwacWindow* w, int64_t nbuffers, int64_t allocSize
|
|||
return UWAC_ERROR_INTERNAL;
|
||||
}
|
||||
|
||||
data = mmap(NULL, 1ull * allocSize * nbuffers, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
||||
const size_t allocbuffersize = 1ull * allocSize * nbuffers;
|
||||
data = mmap(NULL, allocbuffersize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
||||
|
||||
if (data == MAP_FAILED)
|
||||
{
|
||||
|
@ -356,11 +357,11 @@ int UwacWindowShmAllocBuffers(UwacWindow* w, int64_t nbuffers, int64_t allocSize
|
|||
goto error_mmap;
|
||||
}
|
||||
|
||||
pool = wl_shm_create_pool(w->display->shm, fd, allocSize * nbuffers);
|
||||
pool = wl_shm_create_pool(w->display->shm, fd, allocbuffersize);
|
||||
|
||||
if (!pool)
|
||||
{
|
||||
munmap(data, 1ull * allocSize * nbuffers);
|
||||
munmap(data, allocbuffersize);
|
||||
ret = UWAC_ERROR_NOMEMORY;
|
||||
goto error_mmap;
|
||||
}
|
||||
|
@ -386,7 +387,7 @@ int UwacWindowShmAllocBuffers(UwacWindow* w, int64_t nbuffers, int64_t allocSize
|
|||
|
||||
wl_shm_pool_destroy(pool);
|
||||
w->nbuffers += nbuffers;
|
||||
munmap(data, 1ull * allocSize * nbuffers);
|
||||
munmap(data, allocbuffersize);
|
||||
|
||||
error_mmap:
|
||||
close(fd);
|
||||
|
|
Loading…
Reference in New Issue