gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

smsd cannot compile without warning


From: r . velder
Subject: smsd cannot compile without warning
Date: Wed, 04 Jan 2006 13:56:19 -0800



Hey people,
First of all, have a happy and healthy 2006.
I'm having trouble compiling smsd on an opensuse system from gnokii 0.6.10. I allway get the folloeing warning...
---------------------------------------------------------
mysql.c: In function ‘DB_InsertSMS’:
mysql.c:106: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness mysql.c:107: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness mysql.c:107: warning: pointer targets in passing argument 3 of ‘mysql_real_escape_string’ differ in signedness
mysql.c: In function ‘DB_Look’:
mysql.c:191: warning: pointer targets in passing argument 1 of ‘__builtin_strncpy’ differ in signedness mysql.c:195: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
--------------------------------------------------
No other errors. The makefile is as follows. The result is an smsd which removes an incomming message from the phone and places is in the cache directory of playsms but it never places it into the mysql table. Could anyone give mea hint how to prevent te compiler error.

-----------------------
#
# Makefile for the smsd.
#
# Copyright (C) 1999 Hugh Blemings & Pavel Jan� ml.
#               1999-2005 Jan Derfinak
#               2000 Karel Zak
# $Id: Makefile,v 1.33 2005/08/10 07:33:43 ja Exp $
#
#GLIBCFLAGS = glib-config --cflags
#GLIBLDLIBS = glib-config --libs
# Comment out above lines and uncomment below lines if you want compile smsd
# with glib2 instead of glib1.
#
GLIBCFLAGS = pkg-config --cflags glib-2.0
GLIBLDLIBS = pkg-config --libs glib-2.0
TOPDIR=..
include $(TOPDIR)/Makefile.global SMSD_MAN=man/smsd.8
CFLAGS += -DMODULES_DIR=\"${libdir}/smsd\" $(PTHREAD_CFLAGS) \
$(shell $(GLIBCFLAGS))
LDLIBS += $(PTHREAD_LIBS) \
$(shell $(GLIBLDLIBS))
LDLIBS += -rdynamic $(TOPDIR)/common/libgnokii.la -ldl -lz
# Some systems, eg. FreeBSD don't have libdl. Use this:
# LDLIBS += -s -rdynamic -L$(TOPDIR)/common -lgnokii -pthread -L../getopt -lgetopt
OBJS =  smsd.lo \
        lowlevel.lo
DB_OBJS = pq.lo mysql.lo file.lo
# A list of database modules to build.
# FIXME: detect which ones to build in configure
DB_LIBS = libfile.la libpq.la libmysql.la
DB_LIBS := libfile.la all: smsd

smsd: $(OBJS) $(TOPDIR)/common/libgnokii.la $(DB_LIBS)
$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@

### DB Modules
# PostgreSQL support
#pq.lo: smsd.h pq.c
#       $(LIBTOOL) --mode=compile $(CC) -o pq.lo $(CFLAGS) $(CPPFLAGS) \
# -I../include -I$(shell pg_config --includedir) -c pq.c
#libpq.la: pq.lo
#       $(LIBTOOL) --mode=link $(CC) -o libpq.la pq.lo \
#       $(shell $(GLIBLDLIBS)) -L$(shell pg_config --libdir) -lpq \
# -export-dynamic -avoid-version -rpath ${libdir}/smsd
# MySQL support
mysql.lo: smsd.h mysql.c
        $(LIBTOOL) --mode=compile $(CC) -o mysql.lo $(CFLAGS) $(CPPFLAGS) \
        -I../include $(shell mysql_config --cflags) -c mysql.c \
# -I/usr/include/php/ext/mysql/libmysql
libmysql.la: mysql.lo
        $(LIBTOOL) --mode=link $(CC) -o libmysql.la mysql.lo \
        $(shell $(GLIBLDLIBS)) $(shell mysql_config --libs) \
        -export-dynamic -avoid-version -rpath ${libdir}/smsd
# -I/usr/include/php/ext/mysql/libmysql
# File support
file.lo: smsd.h file.c
        $(LIBTOOL) --mode=compile $(CC) -o file.lo $(CFLAGS) $(CPPFLAGS) \
-I../include -c file.c
libfile.la: file.lo
        $(LIBTOOL) --mode=link $(CC) -o libfile.la file.lo \
        $(shell $(GLIBLDLIBS)) \
-export-dynamic -avoid-version -rpath ${libdir}/smsd ### End of DB Modules
$(TOPDIR)/common/libgnokii.la:
$(MAKE) -C $(TOPDIR)/common libgnokii.la
clean:
        $(LIBTOOL) --mode=clean $(RM) smsd $(DB_LIBS) $(OBJS) $(DB_OBJS)
$(RM) *~ depend *.so core*
install: all
        $(INSTALL) -d $(DESTDIR)$(sbindir)
        $(LIBTOOL) --mode=install $(INSTALL) -m 755 smsd $(DESTDIR)$(sbindir)
        $(INSTALL) -d $(DESTDIR)${libdir}/smsd
        for f in $(DB_LIBS) ; do \
        $(LIBTOOL) --mode=install $(INSTALL) $$f $(DESTDIR)${libdir}/smsd ; \
        done
        $(LIBTOOL) --mode=finish ${libdir}/smsd
        $(INSTALL) -d $(DESTDIR)$(man8dir)
$(INSTALL_DATA) $(SMSD_MAN) $(DESTDIR)$(man8dir)
depend dep:
$(CC) $(CFLAGS) -MM *.c >depend
ifeq (depend,$(wildcard depend))
include depend
endif

.PHONY: all install clean dep depend

Thanx in advance. Greetings Randy




reply via email to

[Prev in Thread] Current Thread [Next in Thread]