]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-bus: mark sd_bus_try_close() as deprecated
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 18 Mar 2020 15:40:50 +0000 (16:40 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 18 Mar 2020 18:57:44 +0000 (19:57 +0100)
codesearch.debian.net shows no uses (except for the definition in systemd and
elogind).

$ cat > test.c

int main() {
  sd_bus_try_close(NULL);
  return 0;
}
$ gcc -Isrc/systemd -Wall -o testbus test.c -lsystemd
test.c: In function ‘main’:
test.c:4:3: warning: ‘sd_bus_try_close’ is deprecated [-Wdeprecated-declarations]
    4 |   sd_bus_try_close(NULL);
      |   ^~~~~~~~~~~~~~~~
In file included from test.c:1:
src/systemd/sd-bus.h:180:5: note: declared here
  180 | int sd_bus_try_close(sd_bus *bus) _sd_deprecated_; /* deprecated */
      |     ^~~~~~~~~~~~~~~~

src/systemd/sd-bus.h
tools/meson-check-api-docs.sh

index e6f3298745722e28e6399f4a9f26fdec829d213b..aed214352bc633d48b9824bf15dd977006527a7e 100644 (file)
@@ -177,7 +177,7 @@ int sd_bus_get_sender(sd_bus *bus, const char **ret);
 
 int sd_bus_start(sd_bus *bus);
 
-int sd_bus_try_close(sd_bus *bus);
+int sd_bus_try_close(sd_bus *bus) _sd_deprecated_; /* deprecated */
 void sd_bus_close(sd_bus *bus);
 
 sd_bus *sd_bus_ref(sd_bus *bus);
index bd320562adc82c1c18d30ea45476c8a16f634bff..c33672934da58458fb4938f88fa21ca37403c0fe 100755 (executable)
@@ -6,7 +6,7 @@ sd_total=0
 udev_good=0
 udev_total=0
 
-for symbol in `nm -g --defined-only "$@" | grep " T " | cut -d" " -f3 | sort -u` ; do
+for symbol in `nm -g --defined-only "$@" | grep " T " | cut -d" " -f3 | grep -wv sd_bus_try_close | sort -u` ; do
     if test -f ${MESON_BUILD_ROOT}/man/$symbol.3 ; then
         echo "✓ Symbol $symbol() is documented."
         good=1