Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix c-lint checks with bits/xxx includes #1903

Merged
merged 2 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 0 additions & 56 deletions scripts/c-lint

This file was deleted.

3 changes: 0 additions & 3 deletions src/autofsd-probe/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,5 @@ default_pcp : default

install_pcp : install

check:: $(CFILES)
$(CLINT) $^

check :: $(MAN_PAGES)
$(MANLINT) $^
3 changes: 0 additions & 3 deletions src/collectl2pcp/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,3 @@ default_pcp: default
install_pcp: install

collectl2pcp.o: $(TOPDIR)/src/include/pcp/libpcp.h

check:: $(CFILES) $(HFILES)
$(CLINT) $^
3 changes: 0 additions & 3 deletions src/dbpmda/src/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,3 @@ default_pcp: default
install_pcp: install

$(OBJECTS): $(TOPDIR)/src/include/pcp/libpcp.h

check:: $(CFILES) $(HFILES)
$(CLINT) $^
3 changes: 0 additions & 3 deletions src/find-filter/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,3 @@ install: default
default_pcp: default

install_pcp: install

check:: $(CFILES)
$(CLINT) $^
1 change: 0 additions & 1 deletion src/include/builddefs.in
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ LN_S = @LN_S@
GREP = @grep@
GIT = @GIT@
MANLINT = $(TOPDIR)/scripts/man-lint
CLINT = $(TOPDIR)/scripts/c-lint -I$(TOPDIR)/src/include/pcp
PYLINT = @PYLINT@ --rcfile=$(TOPDIR)/.pylintrc --output-format=colorized
PYTHON = @PYTHON@
PYTHON3 = @PYTHON3@
Expand Down
3 changes: 0 additions & 3 deletions src/libpcp/src/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,3 @@ $(LIBCONFIG): $(LIBCONFIG).in
endif

$(OBJECTS): $(TOPDIR)/src/include/pcp/libpcp.h $(JSONSL_XFILES)

check:: $(CFILES) $(HFILES)
$(CLINT) $^
3 changes: 0 additions & 3 deletions src/libpcp_archive/src/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,3 @@ $(LIBCONFIG): $(LIBCONFIG).in
endif

$(OBJECTS): $(TOPDIR)/src/include/pcp/archive.h

check:: $(CFILES) $(HFILES)
$(CLINT) $^
3 changes: 0 additions & 3 deletions src/libpcp_gui/src/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,3 @@ $(LIBTARGET): $(VERSION_SCRIPT)
endif

$(OBJECTS): $(TOPDIR)/src/include/pcp/libpcp.h

check:: $(CFILES)
$(CLINT) $^
3 changes: 0 additions & 3 deletions src/libpcp_import/src/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,3 @@ domain.h: $(TOPDIR)/src/pmns/stdpmid
$(DOMAIN_MAKERULE)

$(OBJECTS): $(TOPDIR)/src/include/pcp/libpcp.h

check:: $(CFILES) $(HFILES)
$(CLINT) $^
3 changes: 0 additions & 3 deletions src/libpcp_mmv/src/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,3 @@ $(LIBTARGET): $(VERSION_SCRIPT)
endif

mmv_stats.o: $(TOPDIR)/src/include/pcp/libpcp.h

check:: $(CFILES)
$(CLINT) $^
3 changes: 0 additions & 3 deletions src/libpcp_pmcd/src/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,3 @@ default_pcp : default
install_pcp : install

client.o: $(TOPDIR)/src/include/pcp/libpcp.h

check:: $(CFILES)
$(CLINT) $^
3 changes: 0 additions & 3 deletions src/libpcp_pmda/src/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,3 @@ $(LIBCONFIG): $(LIBCONFIG).in
endif

$(OBJECTS): $(TOPDIR)/src/include/pcp/libpcp.h

check:: $(CFILES) $(HFILES) $(XFILES)
$(CLINT) $^
12 changes: 0 additions & 12 deletions src/libpcp_web/src/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,3 @@ discover.o: discover.h discover.c
http_parser.o: http_parser.c http_parser.h
query.o: query.h query.c query_parser.y
http_client.o load.o query.o: $(TOPDIR)/src/include/pcp/libpcp.h

# last 3 suppressions added for (busted?) cppcheck in Fedora 38 and 39
# circa Jan 2024 - Ken
#
check:: $(CFILES) $(HFILES) $(XFILES)
$(CLINT) \
--suppress=unknownMacro:/usr/include/bits/stdlib.h \
--suppress=internalAstError:deps/hiredis-cluster/command.c:351 \
--suppress=va_list_usedBeforeStarted:deps/hiredis/hiredis.c:394 \
--suppress=syntaxError:deps/hiredis/sds.c:1280 \
--suppress=invalidLifetime:deps/hiredis/read.c:337 \
$^
3 changes: 0 additions & 3 deletions src/newhelp/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,3 @@ default_pcp: default
install_pcp: install

chkhelp.o newhelp.o: $(TOPDIR)/src/include/pcp/libpcp.h

check:: $(CFILES)
$(CLINT) $^
4 changes: 0 additions & 4 deletions src/pcp/atop/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,5 @@ gpucom.o: gpumetrics.h

atop.o atopsar.o various.o: $(TOPDIR)/src/include/pcp/libpcp.h

check:: $(CFILES) $(HFILES)
#$(CLINT) $^
#disabled due to https://bugzilla.redhat.com/show_bug.cgi?id=2056773

check:: $(MAN_PAGES)
$(MANLINT) $^
12 changes: 0 additions & 12 deletions src/pcp/htop/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -281,17 +281,5 @@ $(MAN_PAGES): $(CMDTARGET).1.in $(CMDTARGET).5.in
-e 's;pcp/pcp;pcp;g'; \
done

# suppressions added for (busted?) cppcheck in Fedora 38 and 39
# circa Jan 2024 - Ken
#
check:: $(CFILES) $(HFILES)
$(CLINT) \
--suppress=unknownMacro:Action.c \
--suppress=unknownMacro:CommandLine.c \
--suppress=unknownMacro:CRT.c \
--suppress=syntaxError:RowField.h \
--suppress=syntaxError:Meter.c \
$^

check:: $(MAN_PAGES)
$(MANLINT) $^
4 changes: 0 additions & 4 deletions src/pmcd/src/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,3 @@ install_pcp: install
$(OBJECTS): $(HFILES)

$(OBJECTS): $(TOPDIR)/src/include/pcp/libpcp.h

check:: $(CFILES) $(HFILES)
$(CLINT) $^

3 changes: 0 additions & 3 deletions src/pmcd_wait/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,3 @@ default_pcp: default
install_pcp: install

pmcd_wait.o: $(TOPDIR)/src/include/pcp/libpcp.h

check:: $(CFILES)
$(CLINT) $^
3 changes: 1 addition & 2 deletions src/pmclient/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,5 @@ install_pcp: install

pmclient.o pmclient_fg.o: $(TOPDIR)/src/include/pcp/libpcp.h

check:: $(CFILES)
$(CLINT) $(CFILES)
check:: $(PYFILES)
$(PYLINT) $(PYFILES)
3 changes: 0 additions & 3 deletions src/pmcpp/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,3 @@ install_pcp: install

pmcpp.static$(EXECSUFFIX): $(CFILES) $(STATIC_LIBPCP)
$(CCF) -DPCP_STATIC -o $@ $(LDFLAGS) $(CFILES) $(STATIC_LIBPCP) $(STATIC_LDLIBS)

check:: $(CFILES)
$(CLINT) $^
3 changes: 0 additions & 3 deletions src/pmdas/bpf/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ domain.h: ../../pmns/stdpmid
pmns:
$(LN_S) -f root_bpf pmns

check:: $(CFILES)
$(CLINT) $^

check:: $(MAN_PAGES)
$(MANLINT) $^

Expand Down
3 changes: 0 additions & 3 deletions src/pmdas/denki/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,5 @@ $(OBJECTS): domain.h
pmda.o: $(VERSION_SCRIPT)
pmda.o: $(TOPDIR)/src/include/pcp/libpcp.h

check:: $(CFILES)
$(CLINT) $^

check:: $(MAN_PAGES)
$(MANLINT) $^
3 changes: 0 additions & 3 deletions src/pmdas/farm/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ $(VERSION_SCRIPT):
domain.h: ../../pmns/stdpmid
$(DOMAIN_MAKERULE)

check:: $(CFILES) $(HFILES)
$(CLINT) $^

pmda.o: pmdafarm.h
pmda.o farm_stats.o: farm_stats.h

Expand Down
3 changes: 0 additions & 3 deletions src/pmdas/linux/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@ domain.h: ../../pmns/stdpmid
$(CONFTARGETS): mk.rewrite
CPP="$(CPP)" INCDIR="$(TOPDIR)/src/include" ./mk.rewrite

check:: $(CFILES) $(HFILES)
$(CLINT) $^

proc_interrupts.o pmda.o proc_partitions.o: linux.h
numa_meminfo.o proc_cpuinfo.o proc_stat.o: linux.h
filesys.o proc_interrupts.o pmda.o: filesys.h
Expand Down
3 changes: 0 additions & 3 deletions src/pmdas/linux_proc/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,5 @@ pmda.o: $(VERSION_SCRIPT)

acct.o cgroups.o contexts.o pmda.o proc_dynamic.o proc_pid.o: $(TOPDIR)/src/include/pcp/libpcp.h

check:: $(CFILES) $(HFILES)
$(CLINT) $^

check:: $(MAN_PAGES)
$(MANLINT) $^
3 changes: 0 additions & 3 deletions src/pmdas/linux_sockets/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,5 @@ $(OBJECTS): domain.h ss_stats.h
pmda.o: $(TOPDIR)/src/include/pcp/libpcp.h
pmda.o: $(VERSION_SCRIPT)

check:: $(CFILES) $(HFILES)
$(CLINT) $^

check:: $(MAN_PAGES)
$(MANLINT) $^
3 changes: 0 additions & 3 deletions src/pmdas/linux_xfs/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,5 @@ pmda.o: $(VERSION_SCRIPT)

pmda.o: $(TOPDIR)/src/include/pcp/libpcp.h

check:: $(CFILES) $(HFILES)
$(CLINT) $^

check:: $(MAN_PAGES)
$(MANLINT) $^
3 changes: 0 additions & 3 deletions src/pmdas/linux_zfs/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,5 @@ pmda.o: $(VERSION_SCRIPT)

pmda.o: $(TOPDIR)/src/include/pcp/libpcp.h

check:: $(CFILES) $(HFILES)
$(CLINT) $^

check:: $(MAN_PAGES)
$(MANLINT) $^
3 changes: 0 additions & 3 deletions src/pmdas/mmv/src/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,3 @@ pmns:
$(LN_S) -f root_mmv pmns

mmv.o: $(TOPDIR)/src/include/pcp/libpcp.h

check:: $(CFILES)
$(CLINT) $^
3 changes: 0 additions & 3 deletions src/pmdas/perfevent/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,3 @@ perfalloc: perfalloc.o perflock.o

clean clobber::
$(RM) configparser.yy.c perfalloc perfalloc.o

check:: $(CFILES) $(HFILES)
$(CLINT) $^
3 changes: 0 additions & 3 deletions src/pmdas/pmcd/src/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,3 @@ $(VERSION_SCRIPT):
$(LIBTARGET): $(VERSION_SCRIPT)

pmcd.o: $(TOPDIR)/src/include/pcp/libpcp.h

check:: $(CFILES) $(HFILES)
$(CLINT) $^
3 changes: 0 additions & 3 deletions src/pmdas/podman/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,5 @@ pmda.o: $(VERSION_SCRIPT)
pmda.o: $(TOPDIR)/src/include/pcp/libpcp.h
podman.o: $(JSONSL_HFILES)

check:: $(CFILES) $(HFILES)
$(CLINT) $^

check:: $(MAN_PAGES)
$(MANLINT) $^
3 changes: 0 additions & 3 deletions src/pmdas/resctrl/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,5 @@ resctrl.o: $(VERSION_SCRIPT)

resctrl.o: $(TOPDIR)/src/include/pcp/libpcp.h

check:: $(CFILES) $(HFILES)
$(CLINT) $^

check:: $(MAN_PAGES)
$(MANLINT) $^
3 changes: 0 additions & 3 deletions src/pmdas/root/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,3 @@ pmns :

lxc.o root.o: $(TOPDIR)/src/include/pcp/libpcp.h
podman.o: $(JSONSL_HFILES)

check:: $(CFILES) $(HFILES)
$(CLINT) $^
3 changes: 0 additions & 3 deletions src/pmdas/statsd/src/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,3 @@ $(VERSION_SCRIPT):

domain.h: $(TOPDIR)/src/pmns/stdpmid
$(DOMAIN_MAKERULE)

check:: $(CFILES) $(HFILES)
$(CLINT) $^
3 changes: 0 additions & 3 deletions src/pmerr/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,3 @@ default_pcp: default
install_pcp: install

pmerr.o: $(TOPDIR)/src/include/pcp/pmapi.h

check:: $(CFILES)
$(CLINT) $^
3 changes: 0 additions & 3 deletions src/pmfind/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,3 @@ pmfind.service : pmfind.service.in

crontab: crontab.in
$(SED) -e 's;@user@;'$(CRONTAB_USER)';' -e 's;@path@;'$(PCP_BINADM_DIR)';g' $< > $@

check:: $(CFILES)
$(CLINT) $^
3 changes: 0 additions & 3 deletions src/pmhostname/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,3 @@ default_pcp: default
install_pcp: install

pmhostname.o: $(TOPDIR)/src/include/pcp/libpcp.h

check:: $(CFILES)
$(CLINT) $^
3 changes: 0 additions & 3 deletions src/pmie/src/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,3 @@ $(OBJECTS): $(TOPDIR)/src/include/pcp/libpcp.h

$(DUMPER)$(EXECSUFFIX): $(DUMPER).c
$(CCF) -o $@ $(DUMPER).c $(LDFLAGS) $(LDLIBS)

check:: $(CFILES) $(HFILES)
$(CLINT) $^
3 changes: 0 additions & 3 deletions src/pminfo/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,3 @@ $(EXT_FILES):
$(LN_S) $(TOPDIR)/src/external/$@ .

pminfo.o: $(TOPDIR)/src/include/pcp/libpcp.h $(EXT_FILES)

check:: $(CFILES)
$(CLINT) $^
3 changes: 0 additions & 3 deletions src/pmjson/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,3 @@ install_pcp : install

pmjson.o: $(TOPDIR)/src/include/pcp/libpcp.h
pmjson.o: $(TOPDIR)/src/include/pcp/pmjson.h

check:: $(CFILES)
$(CLINT) $^
Loading
Loading