Github user arpadboda commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/417#discussion_r225851325
  
    --- Diff: libminifi/include/capi/cstructs.h ---
    @@ -86,11 +86,16 @@ typedef struct {
      */
     
     typedef struct {
    -  char *key;
    +  const char *key;
    --- End diff --
    
    The problem here is without the const specifier you can't write the 
following:
    ```
    key = "some text"
    ```
    As you end up with a non-const pointer to a string literal. This is pretty 
error-prone as well as any modification on that will compile, but most probably 
lead to a bus error or sg. alike. 


---

Reply via email to