aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--cqrlogo.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 4c67769..4d910b2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
# cqrlogo - CGI QR-Code logo for web services
CC := gcc
+CFLAGS += -O2 -Wall -Werror
CFLAGS += $(shell pkg-config --cflags --libs gdk-pixbuf-2.0) \
$(shell pkg-config --cflags --libs libqrencode)
diff --git a/cqrlogo.c b/cqrlogo.c
index 5e522cb..e0d76c2 100644
--- a/cqrlogo.c
+++ b/cqrlogo.c
@@ -27,10 +27,10 @@ GdkPixbuf * encode_qrcode (char *text, int scale) {
QRcode *qrcode;
GdkPixbuf *pixbuf, *pixbuf_scaled;
int i, j, k, rowstride, channels;
- gchar *pixel;
+ guchar *pixel;
unsigned char *data;
- qrcode = QRcode_encodeData(strlen(text), text, 0, QRCODE_LEVEL);
+ qrcode = QRcode_encodeData(strlen(text), (unsigned char *)text, 0, QRCODE_LEVEL);
if (qrcode == NULL)
return NULL;