]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Fix NULL argument in profile directory trace (#395)
authorLoïc Yhuel <loic.yhuel@gmail.com>
Thu, 25 Apr 2019 19:19:10 +0000 (21:19 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 25 Apr 2019 19:19:10 +0000 (21:19 +0200)
With -fprofile-*=path, we currently print :
"Setting profile directory to (null)".

This fixes the build with gcc 9, which failed with :
error: ‘%s’ directive argument is null [-Werror=format-overflow=]

src/ccache.c

index ca5249523fd3d3be997fea0acda9d607bd5fc92b..cb8b3a721544984fab1d2849ca4b2180ec7c7cdd 100644 (file)
@@ -2972,7 +2972,7 @@ cc_process_args(struct args *args, struct args **preprocessor_args,
                                        result = false;
                                        goto out;
                                } else if (arg_profile_dir) {
-                                       cc_log("Setting profile directory to %s", profile_dir);
+                                       cc_log("Setting profile directory to %s", arg_profile_dir);
                                        profile_dir = x_strdup(arg_profile_dir);
                                }
                                continue;