Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

src/pv/number.c: add missing <stddef.h> include for NULL #1

Merged
merged 1 commit into from
Sep 8, 2021
Merged

src/pv/number.c: add missing <stddef.h> include for NULL #1

merged 1 commit into from
Sep 8, 2021

Conversation

thesamesam
Copy link
Contributor

Fixes a build failure like this:

x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -I./src/include -Isrc/include -DHAVE_CONFIG_H -DLOCALEDIR=\"/usr/share/locale\" -c -o src/pv/number.o src/pv/number.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -I./src/include -Isrc/include -DHAVE_CONFIG_H -DLOCALEDIR=\"/usr/share/locale\" -c -o src/pv/signal.o src/pv/signal.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -I./src/include -Isrc/include -DHAVE_CONFIG_H -DLOCALEDIR=\"/usr/share/locale\" -c -o src/pv/state.o src/pv/state.c
src/pv/number.c: In function ‘pv_getnum_ull’:
src/pv/number.c:32:13: error: ‘NULL’ undeclared (first use in this function)
   32 |         if (NULL == str)
      |             ^~~~
src/pv/number.c:9:1: note: ‘NULL’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
    8 | #include "pv.h"
  +++ |+#include <stddef.h>
    9 |
src/pv/number.c:32:13: note: each undeclared identifier is reported only once for each function it appears in
   32 |         if (NULL == str)
      |             ^~~~
src/pv/number.c: In function ‘pv_getnum_d’:
src/pv/number.c:122:13: error: ‘NULL’ undeclared (first use in this function)
  122 |         if (NULL == str)
      |             ^~~~
src/pv/number.c:122:13: note: ‘NULL’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
make: *** [Makefile:362: src/pv/number.o] Error 1
make: *** Waiting for unfinished jobs....
src/pv/loop.c: In function ‘pv_main_loop’:

Thanks!

@a-j-wood a-j-wood merged commit 6e24924 into a-j-wood:main Sep 8, 2021
@a-j-wood
Copy link
Owner

a-j-wood commented Sep 8, 2021

Thanks! I have merged this in.

@thesamesam
Copy link
Contributor Author

Thanks a bunch! Love the software too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants