Skip to content

Warning fixes and muls libc compatibility#8

Merged
WanWizard merged 6 commits intoOpenPLi:masterfrom
andrea-adami:dev
Jun 20, 2021
Merged

Warning fixes and muls libc compatibility#8
WanWizard merged 6 commits intoOpenPLi:masterfrom
andrea-adami:dev

Conversation

@andrea-adami
Copy link
Copy Markdown
Contributor

@andrea-adami andrea-adami commented Jun 17, 2021

DISTRO should disable debug on configure step in libtuxtxt.bb:

remove EXTRA_OECONF = "--with-boxtype=generic DVB_API_VERSION=5"
and add EXTRA_OECONF = "--with-boxtype=generic DVB_API_VERSION=5 --without-debug"

silence build warning about implicit declaration

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
In file included from ../git/libtuxtxt/libtuxtxt.c:40:
../git/libtuxtxt/tuxtxt_common.h: In function 'tuxtxt_RenderCharIntern':
../git/libtuxtxt/tuxtxt_common.h:4372:14:
 warning: comparison of distinct pointer types lacks a cast
 4372 |       if ((p > pstart) && (memcmp(p-4,bgra[bgcolor],4)==0))
      |              ^
../git/libtuxtxt/tuxtxt_common.h:4387:14:
 warning: comparison of distinct pointer types lacks a cast
 4387 |       if ((p > pstart) && (memcmp(p-4,bgra[fgcolor],4)==0))
      |              ^
../git/libtuxtxt/tuxtxt_common.h:4415:13:
 warning: comparison of distinct pointer types lacks a cast
 4415 |      if ((p > pstart) && (memcmp(p-4,bgra[fgcolor],4)==0))
      |             ^

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Fix build warning about redefined DEBUG
To disable debug just add  --without-debug  when doing configure.

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
fix
libtuxtxt.c:47:46: error:
 'PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP'
 undeclared here (not in a function);
  did you mean 'PTHREAD_MUTEX_INITIALIZER'?

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
fix
 | ../git/tuxtxt/tuxtxt.c:215:15: error: storage size of 's' isn't known
 |   215 |   struct stat s;
 |       |               ^

With glibc this is only:
 warning: implicit declaration of function 'stat' [-Wimplicit-function-declaration]

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
  fix compiler warnings
  The return values used here are hard to guess. Please review.

../git/tuxtxt/tuxtxt.c: In function 'tuxtxt_run_ui':
../git/tuxtxt/tuxtxt.c:267:3:
 warning: 'return' with no value, in function returning non-void
  267 |   return;
      |   ^~~~~~
../git/tuxtxt/tuxtxt.c:178:5:
 note: declared here
  178 | int tuxtxt_run_ui(int pid, int demux)
      |     ^~~~~~~~~~~~~
../git/tuxtxt/tuxtxt.c:277:3:
 warning: 'return' with no value, in function returning non-void
  277 |   return;
      |   ^~~~~~
../git/tuxtxt/tuxtxt.c:178:5:
 note: declared here
  178 | int tuxtxt_run_ui(int pid, int demux)
      |     ^~~~~~~~~~~~~

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
@WanWizard WanWizard merged commit 1402795 into OpenPLi:master Jun 20, 2021
@andrea-adami andrea-adami deleted the dev branch June 21, 2021 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants