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

Cause a coverity error #45

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
3 changes: 1 addition & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ PKG_PROG_PKG_CONFIG
# args. Global CPPFLAGS are ignored during this test.
cc_supports_flag() {
saveCPPFLAGS="$CPPFLAGS"
CPPFLAGS="-Werror $@"
AC_MSG_CHECKING([whether $CC supports "$@"])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[RC=0; AC_MSG_RESULT([yes])],
Expand All @@ -96,7 +95,7 @@ else
GDB_CFLAGS="-g"
fi

DEFAULT_CFLAGS="-Werror -Wall -Wextra"
DEFAULT_CFLAGS=""

# manual overrides
# generates too much noise for stub APIs
Expand Down
11 changes: 10 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
#include <stdio.h>
#include "config.h"


void test(int var)
{
int a=var;
printf("test %d\n", a);
}

int main(void)
{
int ret = 0;
// int testvar;

printf("Hello World without knet!\n");
printf("Hello World without knet\n");
// test(testvar);

return ret;
}
7 changes: 7 additions & 0 deletions testrun.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#!/bin/sh
echo "Test message 1 from cmdlib"

# TEST - fail only on Debian
if [ -f /etc/debian_version ]
then
exit 1
fi

exit 0