From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id DEC324D9A1 for ; Thu, 3 Jul 2025 01:56:06 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 64C4868E4FC; Thu, 3 Jul 2025 04:55:53 +0300 (EEST) Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id AF73268E4DD for ; Thu, 3 Jul 2025 04:55:44 +0300 (EEST) Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-235d6de331fso65888995ad.3 for ; Wed, 02 Jul 2025 18:55:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751507743; x=1752112543; darn=ffmpeg.org; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:from:to:cc:subject:date :message-id:reply-to; bh=hSRTAIHEIRnDgqJQdQA9sfk+9AisRW0gIRjFiURcM68=; b=iY17kN+6AApsVIBB+kUKxNNf+EeH2vqr/FDD78Dz5wuV5yoK+q8WeVqlge9+v7PnrS dWIhQ72peT8Bp60I5Lcea/u8qaZillr8+JpyBoqeDq8kLAAc9264FOaLKCe34KLKdmq0 K32H5EAL6rzCg8s549WwYG1Ae6GURwPtikgEakuzlUQldJdgcKVnbaaPUM2QGjRweu+P OdU0XXub1y/10Uyq9Qna+DfSdcwKd7V4CG9umx0X8TPySaCE89PwCbCf3zYgoWZ50h3F a+t/LwVSUEtNTs7NpFpgFtcXz/KIs0IyA/MiWG3rX2LFfyexwAHYpMceX393nvwLwfbx O15g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751507743; x=1752112543; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=hSRTAIHEIRnDgqJQdQA9sfk+9AisRW0gIRjFiURcM68=; b=VyO+0UXLSVBprZU4gyc5Q1+v/rch8OQPpGmV/mCJoTqMGLeGYSDPmA9WctRfMu0yaQ PRjVXG/u5mRnzChmsvgB94sYP6InA/70web8bquptWLlV28x5u1veLiTaW9xUdK32Yry yaBYoLFN0N2xcHkFrCtph0k+Y26GI9/NvMwRicCc8nScAsnFTcPEan/8WbGwDftQvzxq Ce6FBmGCALiU15dDrliJuW3LmZ7Hhq6np63YmaD3pAtLVYwFPiVwqkvg3jQGBTlKBsXp Lt5/pWc/UikxYOdRLUUxJodh0EGAHUd8rmpWWiwiN0qIuk98Adwd6+RqfTjmT7Dz1p1k Orsw== X-Gm-Message-State: AOJu0YxPDqaJG6CmyME7WbRRBhF4tDM3I59k16pP/wGls+PWJa9ziURp T6ziqaRA7ARm3e70EYIe0602JUqFb+0a2ExlCiyVmmcoT/S7j6A6ETpQ11Q67Q== X-Gm-Gg: ASbGncsi6hkpaSTDWonx2Ubw20Vum5dS97K0tHnjVvbhKCT8XFkIEonfagZKAa75xHU Z0Fu4WjHsVI8gw9tnn9Rn5IrviYZ31mO0GLtuXXN7L9idpoOezKdF4GZ20o/eD43C+HEdl/vDDH T2EO9okDgFHo4GoGruzNFszZebgPspnjf8KGdYXY4T69+/HYReZjDslxVtsyUOftWSeuzDv3nbN sCF7bveSRhIlaubEA1abl0f0GQiD7oeHiv0izSGbdcmw4fk+xOY26OZTaehKtMbgQJ7p5nBA0dO j/tPYP/pst/I3FyBeoRvauKFb4tJJpj9c6DHTdGFW6p9pMqMw+ZS6RYGTgOW2d85hrFSgCoL5K9 /DLrk X-Google-Smtp-Source: AGHT+IHlw62FquTK9r4SeT4xOWvIPjcSnSITkes4+CJ3GYOiPCSIKfT80x/L2zy50YE7Q6LW0GE5Fg== X-Received: by 2002:a17:902:ec92:b0:234:bef7:e227 with SMTP id d9443c01a7336-23c7963edb7mr17619305ad.18.1751507742998; Wed, 02 Jul 2025 18:55:42 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-23acb2e25c6sm137490755ad.6.2025.07.02.18.55.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Jul 2025 18:55:42 -0700 (PDT) From: softworkz X-Google-Original-From: softworkz Message-Id: In-Reply-To: References: X-Original-From: softworkz Date: Thu, 03 Jul 2025 01:55:24 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH 2/3] fftools/textformat: Remove redundant casts X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: softworkz Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: softworkz Signed-off-by: softworkz --- fftools/graph/graphprint.c | 16 ++++++++-------- fftools/resources/resman.c | 6 +++--- fftools/textformat/avtextformat.c | 8 ++++---- fftools/textformat/tf_compact.c | 2 +- fftools/textformat/tf_default.c | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/fftools/graph/graphprint.c b/fftools/graph/graphprint.c index 242eaf8ba1..1218b53383 100644 --- a/fftools/graph/graphprint.c +++ b/fftools/graph/graphprint.c @@ -161,7 +161,7 @@ static inline char *upcase_string(char *dst, size_t dst_size, const char *src) { unsigned i; for (i = 0; src[i] && i < dst_size - 1; i++) - dst[i] = (char)av_toupper(src[i]); + dst[i] = av_toupper(src[i]); dst[i] = 0; return dst; } @@ -261,7 +261,7 @@ static void print_link(GraphPrintContext *gpc, AVFilterLink *link) case AVMEDIA_TYPE_VIDEO: if (hw_frames_ctx && hw_frames_ctx->data) { - AVHWFramesContext * hwfctx = (AVHWFramesContext *)hw_frames_ctx->data; + AVHWFramesContext *hwfctx = (AVHWFramesContext *)hw_frames_ctx->data; const AVPixFmtDescriptor *pix_desc_hw = av_pix_fmt_desc_get(hwfctx->format); const AVPixFmtDescriptor *pix_desc_sw = av_pix_fmt_desc_get(hwfctx->sw_format); if (pix_desc_hw && pix_desc_sw) @@ -498,7 +498,7 @@ static void print_filtergraph_single(GraphPrintContext *gpc, FilterGraph *fg, AV print_int("input_index", ifilter->index); if (ifilter->linklabel) - print_str("link_label", (const char*)ifilter->linklabel); + print_str("link_label", ifilter->linklabel); if (ifilter->filter) { print_id("filter_id", ifilter->filter->name); @@ -506,9 +506,9 @@ static void print_filtergraph_single(GraphPrintContext *gpc, FilterGraph *fg, AV } if (ifilter->linklabel && ifilter->filter) - av_dict_set(&input_map, ifilter->filter->name, (const char *)ifilter->linklabel, 0); + av_dict_set(&input_map, ifilter->filter->name, ifilter->linklabel, 0); else if (ifilter->input_name && ifilter->filter) - av_dict_set(&input_map, ifilter->filter->name, (const char *)ifilter->input_name, 0); + av_dict_set(&input_map, ifilter->filter->name, ifilter->input_name, 0); print_str("media_type", av_get_media_type_string(media_type)); @@ -529,7 +529,7 @@ static void print_filtergraph_single(GraphPrintContext *gpc, FilterGraph *fg, AV print_str("name", ofilter->output_name); if (fg->outputs[i]->linklabel) - print_str("link_label", (const char*)fg->outputs[i]->linklabel); + print_str("link_label", fg->outputs[i]->linklabel); if (ofilter->filter) { print_id("filter_id", ofilter->filter->name); @@ -752,7 +752,7 @@ static int print_streams(GraphPrintContext *gpc, InputFile **ifiles, int nb_ifil for (int n = nb_ofiles - 1; n >= 0; n--) { OutputFile *of = ofiles[n]; - Muxer *muxer = (Muxer *)of; + Muxer *muxer = of; if (!muxer->fc) continue; @@ -1069,7 +1069,7 @@ static int print_filtergraphs_priv(FilterGraph **graphs, int nb_graphs, InputFil goto cleanup; } - avio_write(avio, (const unsigned char *)target_buf.str, FFMIN(target_buf.len, target_buf.size - 1)); + avio_write(avio, target_buf.str, FFMIN(target_buf.len, target_buf.size - 1)); if ((ret = avio_closep(&avio)) < 0) av_log(NULL, AV_LOG_ERROR, "Error closing graph output file, loss of information possible: %s\n", av_err2str(ret)); diff --git a/fftools/resources/resman.c b/fftools/resources/resman.c index aa53e96bf4..4c517b62c0 100644 --- a/fftools/resources/resman.c +++ b/fftools/resources/resman.c @@ -76,7 +76,7 @@ static int decompress_gzip(ResourceManagerContext *ctx, uint8_t *in, unsigned in memset(&strm, 0, sizeof(strm)); // Allocate output buffer with extra byte for null termination - buf = (uint8_t *)av_mallocz(chunk + 1); + buf = av_mallocz(chunk + 1); if (!buf) { av_log(ctx, AV_LOG_ERROR, "Failed to allocate decompression buffer\n"); return AVERROR(ENOMEM); @@ -112,7 +112,7 @@ static int decompress_gzip(ResourceManagerContext *ctx, uint8_t *in, unsigned in buf[*out_len] = 0; // Ensure null termination inflateEnd(&strm); - *out = (char *)buf; + *out = buf; return Z_OK; } #endif @@ -156,7 +156,7 @@ char *ff_resman_get_string(FFResourceId resource_id) char *out = NULL; size_t out_len; - int ret = decompress_gzip(ctx, (uint8_t *)resource_definition.data, *resource_definition.data_len, &out, &out_len); + int ret = decompress_gzip(ctx, resource_definition.data, *resource_definition.data_len, &out, &out_len); if (ret) { av_log(ctx, AV_LOG_ERROR, "Unable to decompress the resource with ID %d\n", resource_id); diff --git a/fftools/textformat/avtextformat.c b/fftools/textformat/avtextformat.c index 651a84578c..39ab4cecb7 100644 --- a/fftools/textformat/avtextformat.c +++ b/fftools/textformat/avtextformat.c @@ -209,8 +209,8 @@ int avtext_context_open(AVTextFormatContext **ptctx, const AVTextFormatter *form /* validate replace string */ { - const uint8_t *p = (uint8_t *)tctx->string_validation_replacement; - const uint8_t *endp = p + strlen((const char *)p); + const uint8_t *p = tctx->string_validation_replacement; + const uint8_t *endp = p + strlen(p); while (*p) { const uint8_t *p0 = p; int32_t code; @@ -313,7 +313,7 @@ void avtext_print_integer(AVTextFormatContext *tctx, const char *key, int64_t va static inline int validate_string(AVTextFormatContext *tctx, char **dstp, const char *src) { - const uint8_t *p, *endp, *srcp = (const uint8_t *)src; + const uint8_t *p, *endp, *srcp = src; AVBPrint dstbuf; AVBPrint invalid_seq; int invalid_chars_nb = 0, ret = 0; @@ -557,7 +557,7 @@ void avtext_print_data_hash(AVTextFormatContext *tctx, const char *key, av_hash_init(tctx->hash); av_hash_update(tctx->hash, data, size); len = snprintf(buf, sizeof(buf), "%s:", av_hash_get_name(tctx->hash)); - av_hash_final_hex(tctx->hash, (uint8_t *)&buf[len], (int)sizeof(buf) - len); + av_hash_final_hex(tctx->hash, &buf[len], (int)sizeof(buf) - len); avtext_print_string(tctx, key, buf, 0); } diff --git a/fftools/textformat/tf_compact.c b/fftools/textformat/tf_compact.c index 62717bba0a..3f38f24f94 100644 --- a/fftools/textformat/tf_compact.c +++ b/fftools/textformat/tf_compact.c @@ -158,7 +158,7 @@ static void compact_print_section_header(AVTextFormatContext *tctx, const void * /* define a prefix for elements not contained in an array or in a wrapper, or for array elements with a type */ - const char *element_name = (char *)av_x_if_null(section->element_name, section->name); + const char *element_name = av_x_if_null(section->element_name, section->name); AVBPrint *section_pbuf = &tctx->section_pbuf[tctx->level]; compact->nested_section[tctx->level] = 1; diff --git a/fftools/textformat/tf_default.c b/fftools/textformat/tf_default.c index 2c91a8dec4..ee0c4137e0 100644 --- a/fftools/textformat/tf_default.c +++ b/fftools/textformat/tf_default.c @@ -57,7 +57,7 @@ static inline char *upcase_string(char *dst, size_t dst_size, const char *src) unsigned i; for (i = 0; src[i] && i < dst_size - 1; i++) - dst[i] = (char)av_toupper(src[i]); + dst[i] = av_toupper(src[i]); dst[i] = 0; return dst; } -- ffmpeg-codebot _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".