Skip to content

Commit

Permalink
scheduler: Fix build failure on Linux with '-Werror -Wall'
Browse files Browse the repository at this point in the history
The string which we add into array stays `const` after fixing OpenPrinting#814
(because `strdup()`, which caused memory leak returned `char *`)
and compiler fails because of it if it runs with '-Werror -Wall'.
  • Loading branch information
zdohnal committed Nov 27, 2023
1 parent 938f7d6 commit e697996
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scheduler/colorman.c
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ colord_create_device(
DBusMessageIter dict; /* D-Bus method arguments */
DBusError error; /* D-Bus error */
const char *device_path; /* Device object path */
char *profile_path; /* Profile path */
const char *profile_path; /* Profile path */
char device_id[1024]; /* Device ID as understood by colord */
char format_str[1024]; /* Qualifier format as a string */

Expand Down Expand Up @@ -1014,7 +1014,7 @@ colord_create_profile(
DBusError error; /* D-Bus error */
char *idstr; /* Profile ID string */
size_t idstrlen; /* Profile ID allocated length */
const char *profile_path; /* Device object path */
char *profile_path; /* Device object path */
char format_str[1024]; /* Qualifier format as a string */


Expand Down

0 comments on commit e697996

Please sign in to comment.