Problems with "make". Very happy if someone could help

Joined
Nov 7, 2013
Messages
1
Reaction score
0
Hello,
I have a make file that looks like this:

SHELL = /bin/sh
.SUFFIXES: .c .o

#note for Windows: replace khmm.so with khmm.dll below
#note for Mac OS X: replace -shared with -dynamiclib, replace khmm.so with khmm$
#note for Solaris: replace gcc with cc below

CC = gcc
LD = gcc
CFLAGS = `perl -MExtUtils::Embed -e ccopts` -fPIC
LDFLAGS = `perl -MExtUtils::Embed -e ldopts`
ARCH = `perl -MConfig -e 'print $$Config{archname}'`
VER = `perl -MConfig -e 'print $$Config{version}'`

khmm.dylib: khmm_wrap.o khmm.o kc.o khmmDev.o
$(LD) -dynamiclib -o $@ $^ $(LDFLAGS)
mkdir -p $(VER)
mkdir -p $(VER)/$(ARCH)/
mkdir -p $(VER)/$(ARCH)/auto/

when I type "make" in the directory where the make file is located I get this:

gcc `perl -MExtUtils::Embed -e ccopts` -fPIC -c -o khmm_wrap.o khmm_wrap.c
gcc `perl -MExtUtils::Embed -e ccopts` -fPIC -c -o khmm.o khmm.c
khmm.c:1091:83: warning: data argument not used by format string
[-Wformat-extra-args]
...fprintf(stderr, "state i=%i is better than prob=$f\n", i, *pprob);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
gcc `perl -MExtUtils::Embed -e ccopts` -fPIC -c -o kc.o kc.c
kc.c:192:9: warning: format string is not a string literal
(potentially insecure) [-Wformat-security]
croak (error_text);
^~~~~~~~~~
kc.c:200:8: warning: format string is not a string literal
(potentially insecure) [-Wformat-security]
warn (error_text);
^~~~~~~~~~
2 warnings generated.
kc.c:200:8: warning: format string is not a string literal
(potentially insecure) [-Wformat-security]
warn (error_text);
^~~~~~~~~~
1 warning generated.
gcc `perl -MExtUtils::Embed -e ccopts` -fPIC -c -o khmmDev.o khmmDev.c
gcc -dynamiclib -o khmm.dylib khmm_wrap.o khmm.o kc.o khmmDev.o `perl -MExtUtils::Embed -e ldopts`
mkdir -p `perl -MConfig -e 'print $Config{version}'`
mkdir -p `perl -MConfig -e 'print $Config{version}'`/`perl -MConfig -e 'print $Config{archname}'`/
mkdir -p `perl -MConfig -e 'print $Config{version}'`/`perl -MConfig -e 'print $Config{archname}'`/auto/
mv khmm.dylib `perl -MConfig -e 'print $Config{version}'`/`perl -MConfig -e 'print $Config{archname}'`/

Why do I get the warnings?

Lavinia
 
Joined
Nov 26, 2010
Messages
3,558
Reaction score
52
This is a technical perl question, you may find more help on a specialist perl forum.

I think its a security risk to pass unformatted strings to functions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top