liangfu commented on a change in pull request #5147: [RUNTIME]crt error handling
URL: https://github.com/apache/incubator-tvm/pull/5147#discussion_r398233351
 
 

 ##########
 File path: src/runtime/crt/graph_runtime.c
 ##########
 @@ -38,25 +38,28 @@ uint32_t Shape_Accumulate(int64_t * shape, uint32_t ndim) {
 }
 
 int NodeEntry_Load(TVMGraphRuntimeNodeEntry * entry, JSONReader * reader) {
-  int status = 0;
+  int status = -1;
   reader->BeginArray(reader);
   if (!(reader->NextArrayItem(reader))) {
     fprintf(stderr, "invalid json format: failed to parse `node_id`\n");
+    return status;
 
 Review comment:
   MISRA-C requires having only one return statement in a function.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to