mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-02 12:02:09 +08:00
wshadow: fix comma three build
old-commit-hash: 45c506bb17e51d4f8592f74c75b9adcffa681201
This commit is contained in:
@@ -689,8 +689,8 @@ static void camera_open(CameraState *s) {
|
||||
csiphy_info->settle_time = MIPI_SETTLE_CNT * 200000000ULL;
|
||||
csiphy_info->data_rate = 48000000; // Calculated by camera_freqs.py
|
||||
|
||||
int ret = device_config(s->csiphy_fd, s->session_handle, s->csiphy_dev_handle, cam_packet_handle);
|
||||
assert(ret == 0);
|
||||
int ret_ = device_config(s->csiphy_fd, s->session_handle, s->csiphy_dev_handle, cam_packet_handle);
|
||||
assert(ret_ == 0);
|
||||
|
||||
munmap(csiphy_info, buf_desc[0].size);
|
||||
release_fd(s->multi_cam_state->video0_fd, buf_desc[0].mem_handle);
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
#include <vector>
|
||||
|
||||
// keep trying if x gets interrupted by a signal
|
||||
#define HANDLE_EINTR(x) \
|
||||
({ \
|
||||
decltype(x) ret; \
|
||||
int try_cnt = 0; \
|
||||
do { \
|
||||
ret = (x); \
|
||||
} while (ret == -1 && errno == EINTR && try_cnt++ < 100); \
|
||||
ret; \
|
||||
#define HANDLE_EINTR(x) \
|
||||
({ \
|
||||
decltype(x) ret_; \
|
||||
int try_cnt = 0; \
|
||||
do { \
|
||||
ret_ = (x); \
|
||||
} while (ret_ == -1 && errno == EINTR && try_cnt++ < 100); \
|
||||
ret_; \
|
||||
})
|
||||
|
||||
#ifndef sighandler_t
|
||||
|
||||
@@ -30,9 +30,9 @@ extern ExitHandler do_exit;
|
||||
|
||||
// ***** OMX callback functions *****
|
||||
|
||||
void OmxEncoder::wait_for_state(OMX_STATETYPE state) {
|
||||
void OmxEncoder::wait_for_state(OMX_STATETYPE state_) {
|
||||
std::unique_lock lk(this->state_lock);
|
||||
while (this->state != state) {
|
||||
while (this->state != state_) {
|
||||
this->state_cv.wait(lk);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,16 +69,16 @@ void Thneed::load(const char *filename) {
|
||||
if (record & THNEED_DEBUG) printf("building %s with size %zu\n", obj.first.c_str(), length);
|
||||
|
||||
cl_program program = clCreateProgramWithSource(context, 1, srcs, &length, NULL);
|
||||
int err = clBuildProgram(program, 1, &device_id, "", NULL, NULL);
|
||||
if (err != 0) {
|
||||
printf("got err %d\n", err);
|
||||
size_t length;
|
||||
int err_ = clBuildProgram(program, 1, &device_id, "", NULL, NULL);
|
||||
if (err_ != 0) {
|
||||
printf("got err %d\n", err_);
|
||||
size_t length_;
|
||||
char buffer[2048];
|
||||
clGetProgramBuildInfo(program, device_id, CL_PROGRAM_BUILD_LOG, sizeof(buffer), buffer, &length);
|
||||
buffer[length] = '\0';
|
||||
clGetProgramBuildInfo(program, device_id, CL_PROGRAM_BUILD_LOG, sizeof(buffer), buffer, &length_);
|
||||
buffer[length_] = '\0';
|
||||
printf("%s\n", buffer);
|
||||
}
|
||||
assert(err == 0);
|
||||
assert(err_ == 0);
|
||||
|
||||
g_programs[obj.first] = program;
|
||||
}
|
||||
@@ -92,11 +92,11 @@ void Thneed::load(const char *filename) {
|
||||
|
||||
if (record & THNEED_DEBUG) printf("binary %s with size %zu\n", name.c_str(), length);
|
||||
|
||||
cl_int err;
|
||||
cl_program program = clCreateProgramWithBinary(context, 1, &device_id, &length, srcs, NULL, &err);
|
||||
assert(program != NULL && err == CL_SUCCESS);
|
||||
err = clBuildProgram(program, 1, &device_id, "", NULL, NULL);
|
||||
assert(err == CL_SUCCESS);
|
||||
cl_int err_;
|
||||
cl_program program = clCreateProgramWithBinary(context, 1, &device_id, &length, srcs, NULL, &err_);
|
||||
assert(program != NULL && err_ == CL_SUCCESS);
|
||||
err_ = clBuildProgram(program, 1, &device_id, "", NULL, NULL);
|
||||
assert(err_ == CL_SUCCESS);
|
||||
|
||||
g_programs[name] = program;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user