- Add strict-aliasing compiler flags
authorJulien Kerihuel <j.kerihuel@openchange.org>
Sun, 22 Feb 2009 16:46:24 +0000 (16:46 +0000)
committerJulien Kerihuel <j.kerihuel@openchange.org>
Sun, 22 Feb 2009 16:46:24 +0000 (16:46 +0000)
- Fix format string warnings on ubuntu buildbot

config.mk.in
libocpf/ocpf_write.c
utils/mapitest/mapitest_print.c

index 8707cc4c5bebef8434cf570696cb2bfb895c067a..4edb92608a63eecb83d06082c91505248cc7af66 100644 (file)
@@ -30,6 +30,7 @@ sambaprefix=@sambaprefix@
 
 DSOOPT=-shared -fPIC
 CFLAGS=@CFLAGS@ -I. -O3 -Wall -Wmissing-prototypes -Wstrict-prototypes -g3 -Wp,-D_FORTIFY_SOURCE=2     \
+       -fstrict-aliasing -Wstrict-aliasing=3                                                           \
           -DDEFAULT_LDIF=\"$(datadir)/setup/profiles\"                                                 \
           -DMAPISTORE_BACKEND_INSTALLDIR=\"$(libdir)/mapistore_backends\"                              \
           -DMAPISTORE_MAPPING_PATH=\"$(prefix)/private/mapistore\"     
index dc75152833cc1137582ca24625fd892c8dfa08db..655bd05bb6f6b2c3ae1fe48047739424d7963840 100644 (file)
@@ -240,7 +240,7 @@ char *ocpf_write_unescape_string(const char *value)
                }
                        
                stmp = talloc_strndup(ocpf->mem_ctx, value + len, tmp + 1);
-               str = talloc_asprintf_append(str, stmp);
+               str = talloc_asprintf_append(str, "%s", stmp);
                if (value[len + tmp + 1] && 
                    (value[len + tmp + 1] == '\\' || value[len + tmp + 1] == '"')) {
                        len += tmp + 2;
index 687525ba8e77dbf60a607a4e1a9dbcce1289a244..a040a568bc1ba1957ec7ed367e80123050f5e1bc 100644 (file)
@@ -133,7 +133,7 @@ _PUBLIC_ void mapitest_underline(struct mapitest *mt, const char *str, char deli
 
        /* print str */
        mapitest_print_tab(mt);
-       fprintf(mt->stream, str);
+       fprintf(mt->stream, "%s", str);
 
        /* underline str using delim */
        mapitest_print_tab(mt);