openwrt / openwrt/packages

privoxy: compile error: incompatible pointer type

Open
#27,480 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Makefile
Stars
4.6k
Forks
4k
Avg merge
3d 12h
Merged PRs (30d)
134

Description

Package Name

privoxy

Maintainer

none

OpenWrt Version

SNAPSHOT

OpenWrt Target/Subtarget

mvebu/cortexa9

Steps to Reproduce

make -j1 V=s packages/privoxy/compile

Actual Behaviour
arm-openwrt-linux-muslgnueabi-gcc -std=gnu23 -c -pipe -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/build/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/privoxy-3.0.34-stable=privoxy-3.0.34-stable -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro  -DNDEBUG -I/build/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-14.3.0_musl_eabi/usr/include -I/build/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-14.3.0_musl_eabi/include -I/build/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-14.3.0_musl_eabi/include/fortify   -pthread -Wall  filters.c -o filters.o
filters.c: In function 'get_filter_function':
filters.c:2104:23: error: assignment to 'filter_function_ptr' {aka 'char * (*)(void)'} from incompatible pointer type 'char * (*)(struct client_state *)' [-Wincompatible-pointer-types]
 2104 |       filter_function = pcrs_filter_response_body;
      |                       ^
filters.c:2109:23: error: assignment to 'filter_function_ptr' {aka 'char * (*)(void)'} from incompatible pointer type 'char * (*)(struct client_state *)' [-Wincompatible-pointer-types]
 2109 |       filter_function = gif_deanimate_response;
      |                       ^
filters.c: In function 'execute_content_filters':
filters.c:2547:42: error: too many arguments to function 'content_filter'
 2547 |    content = (content_filter != NULL) ? (*content_filter)(csp) : NULL;
      |                                         ~^~~~~~~~~~~~~~~~
make[3]: *** [GNUmakefile:310: filters.o] Error 1
Confirmation Checklist

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with filters.c, especially get_filter_function and execute_content_filters, and reproduce the failure with make -j1 V=s packages/privoxy/compile. Compare the filter function declarations and assignments involved in the reported diagnostics. Done means the privoxy package compiles successfully without these errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
networking
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.