Fixed some warnings

This commit is contained in:
Martin Pulec
2021-11-25 15:49:19 +01:00
parent 2a43758fd6
commit e28c79f717
4 changed files with 6 additions and 5 deletions

View File

@@ -503,7 +503,7 @@ char* strdupDecodeGETorPOSTParam(const char* paramNameIncludingEquals, const cha
/* Ok paramStart points at -->"name=" ; let's make it point at "=" */
paramStart = strstr(paramStart, "=");
if (NULL == paramStart) {
ews_printf("It's very suspicious that we couldn't find an equals sign after searching for '%s' in '%s'\n", paramStart, paramString);
ews_printf("It's very suspicious that we couldn't find an equals sign after searching for 'name=' in '%s'\n", paramString);
return strdupIfNotNull(valueIfNotFound);
}
/* We need to skip past the "=" */

View File

@@ -288,7 +288,7 @@ static void crash_signal_handler(int sig)
append(&ptr, ptr_end, "\n" PACKAGE_NAME " has crashed");
#ifndef WIN32
char backtrace_msg[] = "Backtrace:\n";
write(2, backtrace_msg, sizeof backtrace_msg);
write_all(sizeof backtrace_msg, backtrace_msg);
array<void *, 256> addresses{};
int num_symbols = backtrace(addresses.data(), addresses.size());
backtrace_symbols_fd(addresses.data(), num_symbols, 2);

View File

@@ -398,12 +398,12 @@ void * vidcap_testcard2_thread(void *arg)
SDL_FillRect(surf, &r, 0xffffffff);
#ifdef HAVE_LIBSDL_TTF
char frames[20];
char frames[64];
double since_start = tv_diff(next_frame_time, s->start_time);
snprintf(frames, 20, "%02d:%02d:%02d %3d", (int) since_start / 3600 ,
snprintf(frames, sizeof frames, "%02d:%02d:%02d %3d", (int) since_start / 3600,
(int) since_start / 60 % 60,
(int) since_start % 60,
s->count % (int)s->frame->fps);
s->count % (int) s->frame->fps);
text = TTF_RenderText_Solid(font,
frames, col);
#endif

View File

@@ -275,6 +275,7 @@ static int display_aggregate_get_property(void *state, int property, void *val,
codec_t **codecs = malloc(s->devices_cnt * sizeof(codec_t *));
size_t *lens = malloc(s->devices_cnt * sizeof(size_t));
assert(s->devices_cnt > 0);
for (i = 0; i < s->devices_cnt; ++i) {
codecs[i] = malloc(*len);
lens[i] = *len;